diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-10-01 00:08:49 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-10-01 00:08:49 +0000 |
commit | bba6564ccf95c7927b5a60d094930bde5a8b2a29 (patch) | |
tree | 49475e72cc314ac4f708996fb4e18684077237ee /lisp/emacs-lisp | |
parent | 0f3360b0ecc5a43ded9a0d754068413f5528376e (diff) | |
download | emacs-bba6564ccf95c7927b5a60d094930bde5a8b2a29.tar.gz emacs-bba6564ccf95c7927b5a60d094930bde5a8b2a29.tar.bz2 emacs-bba6564ccf95c7927b5a60d094930bde5a8b2a29.zip |
(regexp-opt-group): Put more parenthesis.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/regexp-opt.el | 8 |
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." ;; common prefix: take it and recurse on the suffixes. (let* ((n (length prefix)) (suffixes (mapcar (lambda (s) (substring s n)) strings))) - (concat open-charset + (concat open-group (regexp-quote prefix) (regexp-opt-group suffixes t t) - close-charset)) + close-group)) (let* ((sgnirts (mapcar (lambda (s) (concat (nreverse (string-to-list s)))) @@ -200,11 +200,11 @@ so we can use character sets rather than grouping parenthesis." ;; common suffix: take it and recurse on the prefixes. (let* ((n (- (length xiffus))) (prefixes (mapcar (lambda (s) (substring s 0 n)) strings))) - (concat open-charset + (concat open-group (regexp-opt-group prefixes t t) (regexp-quote (concat (nreverse (string-to-list xiffus)))) - close-charset)) + close-group)) ;; Otherwise, divide the list into those that start with a ;; particular letter and those that do not, and recurse on them. |