From: Mattias EngdegÄrd Date: Thu, 27 Feb 2020 17:29:43 +0000 (+0100) Subject: Revert "Don't complain about the regexp "[:-:]"" X-Git-Tag: emacs-28.0.90~7823 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4859e8db9b518034418f536c5bab3f30cb4714e3;p=emacs.git Revert "Don't complain about the regexp "[:-:]"" This reverts commit 3766bf728a43933083f4525970bcf9fdace3838d. --- diff --git a/src/regex-emacs.c b/src/regex-emacs.c index 794958eb461..38824370e05 100644 --- a/src/regex-emacs.c +++ b/src/regex-emacs.c @@ -2007,7 +2007,7 @@ regex_compile (re_char *pattern, ptrdiff_t size, if (*p == ':') { re_char *q = p + 1; - while (q != pend && *q != ']' && *q != '-') + while (q != pend && *q != ']') { if (*q == ':') { diff --git a/test/src/regex-emacs-tests.el b/test/src/regex-emacs-tests.el index f1c703ab8bd..661d416e6a7 100644 --- a/test/src/regex-emacs-tests.el +++ b/test/src/regex-emacs-tests.el @@ -806,7 +806,6 @@ This evaluates the TESTS test cases from glibc." (ert-deftest regexp-invalid () ;; relint suppression: Duplicated (should-error (string-match "[:space:]" "") - :type 'invalid-regexp) - (should (equal (string-match "[:-:]" "a-:") 2))) + :type 'invalid-regexp)) ;;; regex-emacs-tests.el ends here