(regexp-opt): Always return a properly-grouped regexp.
This commit is contained in:
parent
f05cde180d
commit
9cc236e006
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue