summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-05-14 20:52:07 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2013-05-14 20:52:07 -0400
commit5ac2eb344ff68720495d655bccd4c19ac92b04d9 (patch)
tree4e4030e53385f47ac8b324e95bd092d81c131282 /src
parent180ed218429ec9c0ce8e3ee186a47c9565459eff (diff)
* 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
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/regex.c9
2 files changed, 12 insertions, 5 deletions
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 <monnier@iro.umontreal.ca>
+
+ * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
+
2013-05-14 Eli Zaretskii <eliz@gnu.org>
* 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 <jan.h.d@swipnet.se>
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;