diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-05-23 11:54:44 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-05-23 11:54:44 -0400 |
commit | e4829cb8d789abc8ac72080ba412f90328e44990 (patch) | |
tree | 989ceeff8a2f5b47fa00090a26e5ec6849e9f710 /lisp/minibuffer.el | |
parent | aad65192332dfc4a1df0cd2953554c21da243b51 (diff) | |
download | emacs-e4829cb8d789abc8ac72080ba412f90328e44990.tar.gz |
* lisp/minibuffer.el (completion--sreverse): Remove.
(completion--common-suffix): Use `reverse' instead.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-group): Use `reverse' on strings.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r-- | lisp/minibuffer.el | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index f8e39dc1529..2f898fa1ba5 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -873,6 +873,7 @@ completing buffer and file names, respectively." ;; part of the string (e.g. substitute-in-file-name). (let ((requote (when (completion-metadata-get metadata 'completion--unquote-requote) + (cl-assert (functionp table)) (let ((new (funcall table string point 'completion--unquote))) (setq string (pop new)) (setq table (pop new)) @@ -3057,16 +3058,9 @@ filter out additional entries (because TABLE might not obey PRED)." (nconc (completion-pcm--hilit-commonality pattern all) (length prefix))))) -(defun completion--sreverse (str) - "Like `reverse' but for a string STR rather than a list." - (apply #'string (nreverse (mapcar 'identity str)))) - (defun completion--common-suffix (strs) "Return the common suffix of the strings STRS." - (completion--sreverse - (try-completion - "" - (mapcar #'completion--sreverse strs)))) + (nreverse (try-completion "" (mapcar #'reverse strs)))) (defun completion-pcm--merge-completions (strs pattern) "Extract the commonality in STRS, with the help of PATTERN. |