From: Alan Mackenzie Date: Thu, 16 Apr 2020 17:01:14 +0000 (+0000) Subject: (forward-comment -n): escaped newline is sometimes NOT end of comment X-Git-Tag: emacs-28.0.90~7567 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=22ba04742072098be60ec223ed2e97fa9a09b045;p=emacs.git (forward-comment -n): escaped newline is sometimes NOT end of comment * src/syntax.c (Fforward_comment) When comment-end-can-be-escaped is non-nil, don't attempt back_comment when point is just after an escaped newline, etc. --- diff --git a/src/syntax.c b/src/syntax.c index e24b98da32a..ff125b137cf 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -2572,8 +2572,9 @@ between them, return t; otherwise return nil. */) } else if (code == Sendcomment) { - found = back_comment (from, from_byte, stop, comnested, comstyle, - &out_charpos, &out_bytepos); + found = (!quoted || !Vcomment_end_can_be_escaped) + && back_comment (from, from_byte, stop, comnested, comstyle, + &out_charpos, &out_bytepos); if (!found) { if (c == '\n')