* lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Fix ^.
* test/automated/regexp-tests.el: New file. Fixes: debbugs:16046
This commit is contained in:
parent
c619527c15
commit
bf4906d7ca
4 changed files with 47 additions and 9 deletions
|
@ -285,7 +285,9 @@ CHARS should be a list of characters."
|
|||
;;
|
||||
;; Make sure a caret is not first and a dash is first or last.
|
||||
(if (and (string-equal charset "") (string-equal bracket ""))
|
||||
(concat "[" dash caret "]")
|
||||
(if (string-equal dash "")
|
||||
"\\^" ; [^] is not a valid regexp
|
||||
(concat "[" dash caret "]"))
|
||||
(concat "[" bracket charset caret dash "]"))))
|
||||
|
||||
(provide 'regexp-opt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue