This fixes forward-comment, scan-lists, and parse-partial-sexp.
* src/syntax.c (forw_comment): Detect and skip an escaped comment ender
(e.g. \*/ in C) when comment-end-can-be-escaped is non-nil.
/* We have encountered a nested comment of the same style
as the comment sequence which began this comment section. */
nesting++;
+ if (comment_end_can_be_escaped
+ && (code == Sescape || code == Scharquote))
+ {
+ inc_both (&from, &from_byte);
+ UPDATE_SYNTAX_TABLE_FORWARD (from);
+ if (from == stop) continue; /* Failure */
+ }
inc_both (&from, &from_byte);
UPDATE_SYNTAX_TABLE_FORWARD (from);