From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#24870: 26.0.50; parse-partial-sexp ignores comment-end Date: Thu, 29 Dec 2016 11:14:28 +0000 Message-ID: <20161229111428.GA12532@acm.fritz.box> References: <87mvggh2hu.fsf@users.sourceforge.net> <87h967cj0f.fsf@users.sourceforge.net> <87eg1bcg0y.fsf@users.sourceforge.net> <20161214215834.GB3881@acm.fritz.box> <20161215164458.GA2437@acm.fritz.box> <8737hldce8.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1483010122 17377 195.159.176.226 (29 Dec 2016 11:15:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2016 11:15:22 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 24870@debbugs.gnu.org, Matt Armstrong To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 29 12:15:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMYfs-0002uG-Gz for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Dec 2016 12:15:08 +0100 Original-Received: from localhost ([::1]:35005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMYfx-0000kw-ET for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Dec 2016 06:15:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMYfs-0000jv-16 for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2016 06:15:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMYfn-0006aJ-0a for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2016 06:15:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cMYfm-0006aF-T2 for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2016 06:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cMYfm-0005BK-FU for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2016 06:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Dec 2016 11:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24870 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 24870-submit@debbugs.gnu.org id=B24870.148301009219890 (code B ref 24870); Thu, 29 Dec 2016 11:15:02 +0000 Original-Received: (at 24870) by debbugs.gnu.org; 29 Dec 2016 11:14:52 +0000 Original-Received: from localhost ([127.0.0.1]:58588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMYfc-0005Ak-Fx for submit@debbugs.gnu.org; Thu, 29 Dec 2016 06:14:52 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:14204 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cMYfb-0005Ab-1b for 24870@debbugs.gnu.org; Thu, 29 Dec 2016 06:14:51 -0500 Original-Received: (qmail 16858 invoked by uid 3782); 29 Dec 2016 11:14:48 -0000 Original-Received: from acm.muc.de (p548C6C46.dip0.t-ipconnect.de [84.140.108.70]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 29 Dec 2016 12:14:48 +0100 Original-Received: (qmail 14157 invoked by uid 1000); 29 Dec 2016 11:14:28 -0000 Content-Disposition: inline In-Reply-To: <8737hldce8.fsf@users.sourceforge.net> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127546 Archived-At: Hello, Noam. Sorry this has taken me more time than I anticipated; it's a busy time of the year. :-( On Sun, Dec 18, 2016 at 12:39:11AM -0500, npostavs@users.sourceforge.net wrote: > Alan Mackenzie writes: > > Hello, Noam. > > On Thu, Dec 15, 2016 at 11:33:36AM -0500, Noam Postavsky wrote: [ .... ] > >> > Do you want to make this fix, or should I do it? If you want to > >> > do it, I'm willing (indeed, eager) to review it for you. > >> I'll have a patch ready in a day or two. [ .... ] > Okay, here it is. I think I've made this function a bit less twisty, > and hopefully haven't broken anything new (make check is still passing). syntax.c looks good. It looks very good. I've just got one trivial comment: (i) The new function `check_comment_start' doesn't have a comment saying what its return value means. Possibly you could instead rename it so that the name implies what it returns. Maybe something like `in_double_comment_opener'. I'll admit I haven't actually tried out the code, mainly because you've written a test file. One comment about the test file: (ii) In `parse-partial-sexp-continue-over-comment-marker', variable aftC is the position in the middle of the comment closer "*/". I don't think you are testing in any way that element 10 (nil, or the syntax of the position just before the end point when that position might be the first character of a two-character construct, i.e. an escape or first char of a double-char comment delimiter) is correct. This element 10 was newly introduced this year. Would you please consider adding such a test to this new test file. Thanks! Otherwise, excellent! -- Alan Mackenzie (Nuremberg, Germany).