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:21:43 +0000 Message-ID: <20151228192143.GA27715@acm.fritz.box> References: <20151228160034.7510.58055@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1451330393 5286 80.91.229.3 (28 Dec 2015 19:19:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Dec 2015 19:19:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 28 20:19:47 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 1aDdKc-0004ex-IZ for ged-emacs-devel@m.gmane.org; Mon, 28 Dec 2015 20:19:46 +0100 Original-Received: from localhost ([::1]:45961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDdKb-0002k7-VE for ged-emacs-devel@m.gmane.org; Mon, 28 Dec 2015 14:19:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDdKP-0002jq-Hh for emacs-devel@gnu.org; Mon, 28 Dec 2015 14:19:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDdKK-0005Ip-Ib for emacs-devel@gnu.org; Mon, 28 Dec 2015 14:19:33 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:15757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDdKK-0005IM-9G for emacs-devel@gnu.org; Mon, 28 Dec 2015 14:19:28 -0500 Original-Received: (qmail 60362 invoked by uid 3782); 28 Dec 2015 19:19:26 -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:19:25 +0100 Original-Received: (qmail 28490 invoked by uid 1000); 28 Dec 2015 19:21:43 -0000 Content-Disposition: inline In-Reply-To: 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:197028 Archived-At: Hello, Stefan. On Mon, Dec 28, 2015 at 11:14:36AM -0500, Stefan Monnier wrote: > > - /* Ignore escaped characters, except comment-enders. */ > > - if (code != Sendcomment && char_quoted (from, from_byte)) > > + /* Ignore escaped characters, except comment-enders which cannot > > + be escaped. */ > > + if ((Vcomment_end_can_be_escaped || code != Sendcomment) > > + && char_quoted (from, from_byte)) > [...] > > if (code == Sendcomment > > && SYNTAX_FLAGS_COMMENT_STYLE (syntax, 0) == style > > && (SYNTAX_FLAGS_COMMENT_NESTED (syntax) ? > > - (nesting > 0 && --nesting == 0) : nesting < 0)) > > + (nesting > 0 && --nesting == 0) : nesting < 0) > > + && !(Vcomment_end_can_be_escaped && char_quoted (from, from_byte))) > 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? I've tried it, it's not the case. The indicated * doesn't have Sendcomment syntax, so the if statement doesn't trigger. > Stefan -- Alan Mackenzie (Nuremberg, Germany).