From 5ac2eb344ff68720495d655bccd4c19ac92b04d9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 14 May 2013 20:52:07 -0400 Subject: * lisp/progmodes/f90.el (f90-blocks-re): Include the terminating \> in the surrounding group. * src/regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart. Fixes: debbugs:14402 --- src/ChangeLog | 8 ++++++-- src/regex.c | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index d7778e3a524..0b4ccb0708a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,12 @@ +2013-05-15 Stefan Monnier + + * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart. + 2013-05-14 Eli Zaretskii * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT - unless we know that the window w is a leaf window. Another - attempt at solving bug#14062. + unless we know that the window w is a leaf window. + Another attempt at solving bug#14062. 2013-05-14 Jan Djärv diff --git a/src/regex.c b/src/regex.c index 83d80b5aaa9..04429386f84 100644 --- a/src/regex.c +++ b/src/regex.c @@ -2622,7 +2622,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct goto normal_char; handle_plus: case '*': - /* If there is no previous pattern... */ + /* If there is no previous pattern... */ if (!laststart) { if (syntax & RE_CONTEXT_INVALID_OPS) @@ -2730,7 +2730,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct } } else /* not greedy */ - { /* I wish the greedy and non-greedy cases could be merged. */ + { /* I wish the greedy and non-greedy cases could be merged. */ GET_BUFFER_SPACE (7); /* We might use less. */ if (many_times_ok) @@ -3034,7 +3034,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct /* Allocate space for COUNT + RANGE_TABLE. Needs two bytes for flags, two for COUNT, and three bytes for - each character. */ + each character. */ GET_BUFFER_SPACE (4 + used * 3); /* Indicate the existence of range table. */ @@ -3461,6 +3461,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct /* There is no way to specify the before_dot and after_dot operators. rms says this is ok. --karl */ case '=': + laststart = b; BUF_PUSH (at_dot); break; @@ -3509,12 +3510,14 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct case '<': if (syntax & RE_NO_GNU_OPS) goto normal_char; + laststart = b; BUF_PUSH (wordbeg); break; case '>': if (syntax & RE_NO_GNU_OPS) goto normal_char; + laststart = b; BUF_PUSH (wordend); break; -- cgit v1.2.1