diff options
author | Richard M. Stallman <rms@gnu.org> | 2003-01-20 09:00:48 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2003-01-20 09:00:48 +0000 |
commit | 2afd5e90eb946a0e70547e56a4c705d7d0d4cb7f (patch) | |
tree | c2f9eeddfc520a9a6abd7325b1fa8d4c8c240814 /lisp/emacs-lisp/regexp-opt.el | |
parent | 34a463f1b1edce2f14903bd45b27b0f08702dfea (diff) | |
download | emacs-2afd5e90eb946a0e70547e56a4c705d7d0d4cb7f.tar.gz emacs-2afd5e90eb946a0e70547e56a4c705d7d0d4cb7f.tar.bz2 emacs-2afd5e90eb946a0e70547e56a4c705d7d0d4cb7f.zip |
(regexp-opt-group): Compute HALF2 properly.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
-rw-r--r-- | lisp/emacs-lisp/regexp-opt.el | 5 |
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." ;; particular letter and those that do not, and recurse on them. (let* ((char (char-to-string (string-to-char (car strings)))) (half1 (all-completions char strings)) - (half2 (nthcdr (length half1) strings))) + (half2 strings)) + ;; Remove from HALF2 whatever is in HALF1. + (dolist (elt half1) + (setq half2 (delq elt half2))) (concat open-group (regexp-opt-group half1) "\\|" (regexp-opt-group half2) |