diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-05-23 17:19:22 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-05-23 17:19:22 +0000 |
commit | 9cc236e006e474dc83a90d0bb5bc5f6b99c9351e (patch) | |
tree | 238d4ed54e268a1cd91c090d40299a107f42bcab /lisp/emacs-lisp/regexp-opt.el | |
parent | f05cde180d893a81e41f27b0a4cfbfb38de3f752 (diff) | |
download | emacs-9cc236e006e474dc83a90d0bb5bc5f6b99c9351e.tar.gz emacs-9cc236e006e474dc83a90d0bb5bc5f6b99c9351e.tar.bz2 emacs-9cc236e006e474dc83a90d0bb5bc5f6b99c9351e.zip |
(regexp-opt): Always return a properly-grouped regexp.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
-rw-r--r-- | lisp/emacs-lisp/regexp-opt.el | 2 |
1 files changed, 1 insertions, 1 deletions
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 |