From 4859e8db9b518034418f536c5bab3f30cb4714e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Thu, 27 Feb 2020 18:29:43 +0100 Subject: [PATCH] Revert "Don't complain about the regexp "[:-:]"" This reverts commit 3766bf728a43933083f4525970bcf9fdace3838d. --- src/regex-emacs.c | 2 +- test/src/regex-emacs-tests.el | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 -- 2.39.2