all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Stefan Monnier <monnier@IRO.UMontreal.CA>, emacs-devel@gnu.org
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	[thread overview]
Message-ID: <20151228192557.GB27715@acm.fritz.box> (raw)
In-Reply-To: <56816633.5050603@cs.ucla.edu>

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.

Yes.

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2015-12-28 19:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151228160034.7510.58055@vcs.savannah.gnu.org>
     [not found] ` <E1aDaDr-0001xo-1I@vcs.savannah.gnu.org>
2015-12-28 16:14   ` [Emacs-diffs] emacs-25 326ffcc: Allow line comments ending with escaped NL to be continued to the next line Stefan Monnier
2015-12-28 16:41     ` Paul Eggert
2015-12-28 19:25       ` Alan Mackenzie [this message]
2015-12-28 19:21     ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151228192557.GB27715@acm.fritz.box \
    --to=acm@muc.de \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.