Mercurial > emacs
changeset 32041:a055173cadf8
(regexp-opt-group): Put more parenthesis.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 01 Oct 2000 00:08:49 +0000 |
parents | 02773dbde247 |
children | 81c2a01bd3b3 |
files | lisp/emacs-lisp/regexp-opt.el |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/regexp-opt.el Sat Sep 30 17:03:27 2000 +0000 +++ b/lisp/emacs-lisp/regexp-opt.el Sun Oct 01 00:08:49 2000 +0000 @@ -187,10 +187,10 @@ ;; 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 @@ ;; 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.