# HG changeset patch # User Richard M. Stallman # Date 865103456 0 # Node ID 55e03c524041b66e9f01d9ccda2c8a3f6f0e0104 # Parent 5fbb5aef564905854083690d393d86cd7a373c50 (Fforward_comment): Handle unmatched two-character comment starters. diff -r 5fbb5aef5649 -r 55e03c524041 src/syntax.c --- a/src/syntax.c Sat May 31 18:16:22 1997 +0000 +++ b/src/syntax.c Sat May 31 18:30:56 1997 +0000 @@ -1538,6 +1538,17 @@ 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) {