From: Stefan Monnier Date: Fri, 23 May 2008 17:19:22 +0000 (+0000) Subject: (regexp-opt): Always return a properly-grouped regexp. X-Git-Tag: emacs-pretest-23.0.90~5325 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9cc236e006e474dc83a90d0bb5bc5f6b99c9351e;p=emacs.git (regexp-opt): Always return a properly-grouped regexp. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b18c3e3b07..9f20d191528 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-05-23 Stefan Monnier + + * emacs-lisp/regexp-opt.el (regexp-opt): Always return + a properly-grouped regexp. + 2008-05-23 Juanma Barranquero * progmodes/cap-words.el (capitalized-words-mode): diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 70f7141210d..309c8e7bb89 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -107,7 +107,7 @@ by \\=\\< and \\>." (open (cond ((stringp paren) paren) (paren "\\("))) (sorted-strings (delete-dups (sort (copy-sequence strings) 'string-lessp))) - (re (regexp-opt-group sorted-strings open))) + (re (regexp-opt-group sorted-strings (or open t) (not open)))) (if words (concat "\\<" re "\\>") re)))) ;;;###autoload