Mercurial > emacs
changeset 49335:17b694d6fb86
(regexp-opt-group): Compute HALF2 properly.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 20 Jan 2003 09:00:48 +0000 |
parents | 8dad7ccccdcb |
children | d4e6f40cba36 |
files | lisp/emacs-lisp/regexp-opt.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/regexp-opt.el Mon Jan 20 08:59:40 2003 +0000 +++ b/lisp/emacs-lisp/regexp-opt.el Mon Jan 20 09:00:48 2003 +0000 @@ -223,7 +223,10 @@ ;; 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)