[Top][All Lists]

[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:25:57 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Paul.

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:

> /\
> \
> *blabla*\
> \
> /
> printf ("\
> \\
> n\
> ");

> is a closed comment followed by printf ("\n"), because backslash-newline 
> removal 
> 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 
> was 
> hacking on the GNU C preprocessor.


Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]