aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-01-20 09:00:48 +0000
committerRichard M. Stallman2003-01-20 09:00:48 +0000
commit2afd5e90eb946a0e70547e56a4c705d7d0d4cb7f (patch)
treec2f9eeddfc520a9a6abd7325b1fa8d4c8c240814
parent34a463f1b1edce2f14903bd45b27b0f08702dfea (diff)
downloademacs-2afd5e90eb946a0e70547e56a4c705d7d0d4cb7f.tar.gz
emacs-2afd5e90eb946a0e70547e56a4c705d7d0d4cb7f.zip
(regexp-opt-group): Compute HALF2 properly.
-rw-r--r--lisp/emacs-lisp/regexp-opt.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index b746c8a22f3..ea80801b610 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -223,7 +223,10 @@ so we can use character sets rather than grouping parenthesis."
223 ;; particular letter and those that do not, and recurse on them. 223 ;; particular letter and those that do not, and recurse on them.
224 (let* ((char (char-to-string (string-to-char (car strings)))) 224 (let* ((char (char-to-string (string-to-char (car strings))))
225 (half1 (all-completions char strings)) 225 (half1 (all-completions char strings))
226 (half2 (nthcdr (length half1) strings))) 226 (half2 strings))
227 ;; Remove from HALF2 whatever is in HALF1.
228 (dolist (elt half1)
229 (setq half2 (delq elt half2)))
227 (concat open-group 230 (concat open-group
228 (regexp-opt-group half1) 231 (regexp-opt-group half1)
229 "\\|" (regexp-opt-group half2) 232 "\\|" (regexp-opt-group half2)