diff options
author | Alan Mackenzie <acm@muc.de> | 2020-04-16 17:01:14 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2020-04-16 17:01:14 +0000 |
commit | 22ba04742072098be60ec223ed2e97fa9a09b045 (patch) | |
tree | bb0f3edb39c108d696961c4502e69852ff925beb | |
parent | 0127118c2592ee5103cc36be5aaed0c9443ae82f (diff) | |
download | emacs-22ba04742072098be60ec223ed2e97fa9a09b045.tar.gz |
(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.
-rw-r--r-- | src/syntax.c | 5 |
1 files changed, 3 insertions, 2 deletions
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') |