GNU bug report logs - #43558
[PATCH]: Fix (forward-comment 1) when end delimiter is escaped.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Tue, 22 Sep 2020 09:36:02 UTC

Severity: normal

Tags: confirmed

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Mattias EngdegÄrd <mattiase <at> acm.org>
Cc: 43558 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#43558: [PATCH]: Fix (forward-comment 1) when end delimiter is escaped.
Date: Wed, 23 Sep 2020 14:48:24 +0000
Hello, Mattias.

On Wed, Sep 23, 2020 at 11:01:59 +0200, Mattias EngdegÄrd wrote:
> Sorry if I misunderstood, but since when do backslashes escape */ in C?

Since forever, but only in the CC Mode test suite.  :-(

I just tried it out with gcc, and it seems that \*/ does indeed end a
block comment.  But an escaped newline doesn't end a line comment,
instead continuing it to the next line.  So I got confused.  Thanks for
pointing out the mistake.

It seems that as well as the existing variable
comment-end-can-be-escaped, we need a new one, say
line-comment-end-can-be-escaped, too.  In C and C++ modes, these would
be nil and t respectively.

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 3 years and 47 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.