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

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.

Backslash-backslash-newline can be tricky, as I recall from long ago when I was 
hacking on the GNU C preprocessor.



  reply	other threads:[~2015-12-28 16:41 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 [this message]
2015-12-28 19:25       ` Alan Mackenzie
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=56816633.5050603@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=acm@muc.de \
    --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.