# HG changeset patch # User Richard M. Stallman # Date 1043053248 0 # Node ID 17b694d6fb863c20f8388b5e3a5439279f0244bf # Parent 8dad7ccccdcb62afff9391b7372d70aa535f864d (regexp-opt-group): Compute HALF2 properly. diff -r 8dad7ccccdcb -r 17b694d6fb86 lisp/emacs-lisp/regexp-opt.el --- 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)