Suggested by Clément Pit-Claudel.
* src/regex-emacs.c (regex_compile):
* test/src/regex-emacs-tests.el (regexp-invalid): Tolerate ranges.
if (*p == ':')
{
re_char *q = p + 1;
- while (q != pend && *q != ']')
+ while (q != pend && *q != ']' && *q != '-')
{
if (*q == ':')
{
(ert-deftest regexp-invalid ()
;; relint suppression: Duplicated
(should-error (string-match "[:space:]" "")
- :type 'invalid-regexp))
+ :type 'invalid-regexp)
+ (should (equal (string-match "[:-:]" "a-:") 2)))
;;; regex-emacs-tests.el ends here