emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4859e8d 1/2: Revert "Don't complain about the regexp "[:-:]""


From: Mattias Engdegård
Subject: master 4859e8d 1/2: Revert "Don't complain about the regexp "[:-:]""
Date: Thu, 27 Feb 2020 12:58:13 -0500 (EST)

branch: master
commit 4859e8db9b518034418f536c5bab3f30cb4714e3
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>

    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 794958e..3882437 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 f1c703a..661d416 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]