1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 06:20:43 -08:00

* 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.
This commit is contained in:
Stefan Monnier 2014-05-23 11:54:44 -04:00
parent aad6519233
commit e4829cb8d7
3 changed files with 10 additions and 13 deletions

View file

@ -205,9 +205,7 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher."
(regexp-opt-group suffixes t t)
close-group))
(let* ((sgnirts (mapcar (lambda (s)
(concat (nreverse (string-to-list s))))
strings))
(let* ((sgnirts (mapcar #'reverse strings))
(xiffus (try-completion "" sgnirts)))
(if (> (length xiffus) 0)
;; common suffix: take it and recurse on the prefixes.
@ -218,8 +216,7 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher."
'string-lessp)))
(concat open-group
(regexp-opt-group prefixes t t)
(regexp-quote
(concat (nreverse (string-to-list xiffus))))
(regexp-quote (nreverse xiffus))
close-group))
;; Otherwise, divide the list into those that start with a