summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2020-04-16 17:01:14 +0000
committerAlan Mackenzie <acm@muc.de>2020-04-16 17:01:14 +0000
commit22ba04742072098be60ec223ed2e97fa9a09b045 (patch)
treebb0f3edb39c108d696961c4502e69852ff925beb
parent0127118c2592ee5103cc36be5aaed0c9443ae82f (diff)
downloademacs-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.c5
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')