From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel 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 Message-ID: <20151228192557.GB27715@acm.fritz.box> References: <20151228160034.7510.58055@vcs.savannah.gnu.org> <56816633.5050603@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1451330653 9033 80.91.229.3 (28 Dec 2015 19:24:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Dec 2015 19:24:13 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 28 20:24:01 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aDdOh-0000kA-6g for ged-emacs-devel@m.gmane.org; Mon, 28 Dec 2015 20:23:59 +0100 Original-Received: from localhost ([::1]:45970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDdOf-0003d5-Ot for ged-emacs-devel@m.gmane.org; Mon, 28 Dec 2015 14:23:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDdOT-0003cx-HL for emacs-devel@gnu.org; Mon, 28 Dec 2015 14:23:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDdOP-0006AG-GB for emacs-devel@gnu.org; Mon, 28 Dec 2015 14:23:45 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:58405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDdOP-0006AC-6t for emacs-devel@gnu.org; Mon, 28 Dec 2015 14:23:41 -0500 Original-Received: (qmail 61345 invoked by uid 3782); 28 Dec 2015 19:23:40 -0000 Original-Received: from acm.muc.de (p548A5EF8.dip0.t-ipconnect.de [84.138.94.248]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 28 Dec 2015 20:23:39 +0100 Original-Received: (qmail 28500 invoked by uid 1000); 28 Dec 2015 19:25:57 -0000 Content-Disposition: inline In-Reply-To: <56816633.5050603@cs.ucla.edu> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197029 Archived-At: 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).