[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-25 326ffcc: Allow line comments ending with esca
From: |
Alan Mackenzie |
Subject: |
Re: [Emacs-diffs] emacs-25 326ffcc: Allow line comments ending with escaped NL to be continued to the next line. |
Date: |
Mon, 28 Dec 2015 19:21:43 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello, Stefan.
On Mon, Dec 28, 2015 at 11:14:36AM -0500, Stefan Monnier wrote:
> > - /* Ignore escaped characters, except comment-enders. */
> > - if (code != Sendcomment && char_quoted (from, from_byte))
> > + /* Ignore escaped characters, except comment-enders which cannot
> > + be escaped. */
> > + if ((Vcomment_end_can_be_escaped || code != Sendcomment)
> > + && char_quoted (from, from_byte))
> [...]
> > if (code == Sendcomment
> > && SYNTAX_FLAGS_COMMENT_STYLE (syntax, 0) == style
> > && (SYNTAX_FLAGS_COMMENT_NESTED (syntax) ?
> > - (nesting > 0 && --nesting == 0) : nesting < 0))
> > + (nesting > 0 && --nesting == 0) : nesting < 0)
> > + && !(Vcomment_end_can_be_escaped && char_quoted (from,
> > from_byte)))
> Hmm... the way I read this, it would mean that
> /*blabla\*/
^
|
> will be treated as an unclosed comment. Is that the way C defines it as well?
I've tried it, it's not the case. The indicated * doesn't have
Sendcomment syntax, so the if statement doesn't trigger.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).