aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-10-01 00:08:49 +0000
committerStefan Monnier2000-10-01 00:08:49 +0000
commitbba6564ccf95c7927b5a60d094930bde5a8b2a29 (patch)
tree49475e72cc314ac4f708996fb4e18684077237ee
parent0f3360b0ecc5a43ded9a0d754068413f5528376e (diff)
downloademacs-bba6564ccf95c7927b5a60d094930bde5a8b2a29.tar.gz
emacs-bba6564ccf95c7927b5a60d094930bde5a8b2a29.zip
(regexp-opt-group): Put more parenthesis.
-rw-r--r--lisp/emacs-lisp/regexp-opt.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index e07e15db6f1..b938db6c82b 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -187,10 +187,10 @@ so we can use character sets rather than grouping parenthesis."
187 ;; common prefix: take it and recurse on the suffixes. 187 ;; common prefix: take it and recurse on the suffixes.
188 (let* ((n (length prefix)) 188 (let* ((n (length prefix))
189 (suffixes (mapcar (lambda (s) (substring s n)) strings))) 189 (suffixes (mapcar (lambda (s) (substring s n)) strings)))
190 (concat open-charset 190 (concat open-group
191 (regexp-quote prefix) 191 (regexp-quote prefix)
192 (regexp-opt-group suffixes t t) 192 (regexp-opt-group suffixes t t)
193 close-charset)) 193 close-group))
194 194
195 (let* ((sgnirts (mapcar (lambda (s) 195 (let* ((sgnirts (mapcar (lambda (s)
196 (concat (nreverse (string-to-list s)))) 196 (concat (nreverse (string-to-list s))))
@@ -200,11 +200,11 @@ so we can use character sets rather than grouping parenthesis."
200 ;; common suffix: take it and recurse on the prefixes. 200 ;; common suffix: take it and recurse on the prefixes.
201 (let* ((n (- (length xiffus))) 201 (let* ((n (- (length xiffus)))
202 (prefixes (mapcar (lambda (s) (substring s 0 n)) strings))) 202 (prefixes (mapcar (lambda (s) (substring s 0 n)) strings)))
203 (concat open-charset 203 (concat open-group
204 (regexp-opt-group prefixes t t) 204 (regexp-opt-group prefixes t t)
205 (regexp-quote 205 (regexp-quote
206 (concat (nreverse (string-to-list xiffus)))) 206 (concat (nreverse (string-to-list xiffus))))
207 close-charset)) 207 close-group))
208 208
209 ;; Otherwise, divide the list into those that start with a 209 ;; Otherwise, divide the list into those that start with a
210 ;; particular letter and those that do not, and recurse on them. 210 ;; particular letter and those that do not, and recurse on them.