summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-05-31 18:30:56 +0000
committerRichard M. Stallman <rms@gnu.org>1997-05-31 18:30:56 +0000
commitae03af34440c078ef59145929b17eca696b9e3f7 (patch)
tree97e66e50bcfba71c886890ebdfd534e5e1facd8c /src/syntax.c
parentea315ed6e49d61f23496698a9b871119d6f35b12 (diff)
downloademacs-ae03af34440c078ef59145929b17eca696b9e3f7.tar.gz
(Fforward_comment): Handle unmatched two-character comment starters.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c
index ed664805ecd..76428999ea1 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1538,6 +1538,17 @@ between them, return t; otherwise return nil.")
comstyle = SYNTAX_COMMENT_STYLE (c1);
from = temp_pos;
}
+ if (from > stop && SYNTAX_COMSTART_SECOND (c)
+ && (c1 = FETCH_CHAR (temp_pos),
+ SYNTAX_COMSTART_FIRST (c1))
+ && !char_quoted (temp_pos))
+ {
+ /* We must record the comment style encountered so that
+ later, we can match only the proper comment begin
+ sequence of the same style. */
+ code = Scomment;
+ from = temp_pos;
+ }
if (code == Scomment_fence)
{