1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-03 20:24:29 +00:00

(regexp-opt): Always return a properly-grouped regexp.

This commit is contained in:
Stefan Monnier 2008-05-23 17:19:22 +00:00
parent f05cde180d
commit 9cc236e006
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/regexp-opt.el (regexp-opt): Always return
a properly-grouped regexp.
2008-05-23 Juanma Barranquero <lekktu@gmail.com>
* progmodes/cap-words.el (capitalized-words-mode):

View File

@ -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