[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-25 326ffcc: Allow line comments ending with esca
Re: [Emacs-diffs] emacs-25 326ffcc: Allow line comments ending with escaped NL to be continued to the next line.
Mon, 28 Dec 2015 19:25:57 +0000
On Mon, Dec 28, 2015 at 08:41:23AM -0800, Paul Eggert wrote:
> Stefan Monnier wrote:
> > 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?
> No, that's a closed comment. More interestingly, this:
> printf ("\
> is a closed comment followed by printf ("\n"), because backslash-newline
> is done before tokenization. So the "right" fix would be to ignore
> backslash-newline before identifying comments and other tokens.
In general, that's probably more hassle than it's worth. But I don't
think it would be too difficult to remove escaped newlines from
comments. I'll see what I can manage.
> Backslash-backslash-newline can be tricky, as I recall from long ago when I
> hacking on the GNU C preprocessor.
Alan Mackenzie (Nuremberg, Germany).