(at_begline_loc_p): Also recognize the \\(?:^ case

of an anchor at the beginning of a shy-group.
This commit is contained in:
Stefan Monnier 2000-05-25 16:32:19 +00:00
parent fc6a6a4e9d
commit d2af47dfec
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2000-05-25 Stefan Monnier <monnier@cs.yale.edu>
* regex.c (at_begline_loc_p): Also recognize the \\(?:^ case
of an anchor at the beginning of a shy-group.
2000-05-25 Gerd Moellmann <gerd@gnu.org>
* xdisp.c (handle_invisible_prop): Don't try to skip over

View file

@ -3208,7 +3208,12 @@ at_begline_loc_p (pattern, p, syntax)
/* After a subexpression? */
(*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
/* After an alternative? */
|| (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
|| (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash))
/* After a shy subexpression? */
|| ((syntax & RE_SHY_GROUPS) && prev - 2 >= pattern
&& prev[-1] == '?' && prev[-2] == '('
&& (syntax & RE_NO_BK_PARENS
|| (prev - 3 >= pattern && prev[-3] == '\\')));
}