Skip to content

Commit

Permalink
Merge pull request #619 from keram/remove-unused
Browse files Browse the repository at this point in the history
Remove unused and nonprefixed helper function `find-common-prefix`
  • Loading branch information
jfdm authored Aug 2, 2023
2 parents c96f45d + 8f62ba8 commit a7f0af7
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions idris-repl.el
Original file line number Diff line number Diff line change
Expand Up @@ -326,18 +326,6 @@ Invokes `idris-repl-mode-hook'."
nil
(list (+ idris-input-start (length partial)) (point-max) completions))))))

(defun find-common-prefix (input slist)
"Finds longest common prefix of all strings in SLIST."
(let ((first (car slist))
(ilen (length input)))
(if (> (length first) ilen)
(progn
(let ((next (substring first 0 (1+ ilen))))
(if (cl-every (lambda (p) (string-prefix-p next p)) slist)
(find-common-prefix next slist)
input)))
input)))

(defun idris-repl-begin-of-prompt ()
"Go to the beginning of line or the prompt."
(interactive)
Expand Down

0 comments on commit a7f0af7

Please sign in to comment.