summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/regexp-opt.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-05-23 11:54:44 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-05-23 11:54:44 -0400
commite4829cb8d789abc8ac72080ba412f90328e44990 (patch)
tree989ceeff8a2f5b47fa00090a26e5ec6849e9f710 /lisp/emacs-lisp/regexp-opt.el
parentaad65192332dfc4a1df0cd2953554c21da243b51 (diff)
downloademacs-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/emacs-lisp/regexp-opt.el')
-rw-r--r--lisp/emacs-lisp/regexp-opt.el7
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index b2d4f2b71dd..ff9388171a6 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -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