aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regex-emacs.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/regex-emacs.c b/src/regex-emacs.c
index ae82dd63917..ad140908609 100644
--- a/src/regex-emacs.c
+++ b/src/regex-emacs.c
@@ -3874,9 +3874,22 @@ mutually_exclusive_aux (struct re_pattern_buffer *bufp, re_char *p1,
3874 return ((re_opcode_t) *p1 == notsyntaxspec && p1[1] == p2[1]); 3874 return ((re_opcode_t) *p1 == notsyntaxspec && p1[1] == p2[1]);
3875 3875
3876 case wordbound: 3876 case wordbound:
3877 /* FIXME: This optimization seems correct after the first iteration
3878 of the loop, but not for the very first :-(
3879 IOW we'd need to pull out the first iteration and do:
3880
3881 syntaxspec w
3882 on_failure_keep_string_jump end
3883 loop:
3884 syntaxspec w
3885 goto loop
3886 end:
3887 wordbound
3888
3877 return (((re_opcode_t) *p1 == notsyntaxspec 3889 return (((re_opcode_t) *p1 == notsyntaxspec
3878 || (re_opcode_t) *p1 == syntaxspec) 3890 || (re_opcode_t) *p1 == syntaxspec)
3879 && p1[1] == Sword); 3891 && p1[1] == Sword); */
3892 return false;
3880 3893
3881 case categoryspec: 3894 case categoryspec:
3882 return ((re_opcode_t) *p1 == notcategoryspec && p1[1] == p2[1]); 3895 return ((re_opcode_t) *p1 == notcategoryspec && p1[1] == p2[1]);