summaryrefslogtreecommitdiff
path: root/src/regex-emacs.c
diff options
context:
space:
mode:
authorMattias Engdegård <mattiase@acm.org>2020-02-26 22:59:22 +0100
committerMattias Engdegård <mattiase@acm.org>2020-02-26 22:59:22 +0100
commit3766bf728a43933083f4525970bcf9fdace3838d (patch)
tree34f1a94f379bac2b2f6fa28866de6e30da1dbd7d /src/regex-emacs.c
parent8d5e8cddab732ac90e9ae930c63f7830f9dab24f (diff)
downloademacs-3766bf728a43933083f4525970bcf9fdace3838d.tar.gz
Don't complain about the regexp "[:-:]"
Suggested by Clément Pit-Claudel. * src/regex-emacs.c (regex_compile): * test/src/regex-emacs-tests.el (regexp-invalid): Tolerate ranges.
Diffstat (limited to 'src/regex-emacs.c')
-rw-r--r--src/regex-emacs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex-emacs.c b/src/regex-emacs.c
index 38824370e05..794958eb461 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 != ']')
+ while (q != pend && *q != ']' && *q != '-')
{
if (*q == ':')
{