From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#23019: parse-partial-sexp doesn't output the full state needed for its continuance. Date: Tue, 15 Mar 2016 09:13:55 +0000 Message-ID: <20160315091355.GA2263@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1458033149 8223 80.91.229.3 (15 Mar 2016 09:12:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Mar 2016 09:12:29 +0000 (UTC) To: 23019@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 15 10:12:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1afl1S-0005pP-FL for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Mar 2016 10:12:15 +0100 Original-Received: from localhost ([::1]:46531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afl1M-0006sa-Vq for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Mar 2016 05:12:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afl1J-0006rU-IW for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 05:12:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afl1G-0001aY-Cm for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 05:12:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afl1G-0001aI-99 for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 05:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1afl1G-0003Az-2q for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 05:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Mar 2016 09:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23019 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145803309112172 (code B ref -1); Tue, 15 Mar 2016 09:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Mar 2016 09:11:31 +0000 Original-Received: from localhost ([127.0.0.1]:48515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1afl0l-0003AG-5z for submit@debbugs.gnu.org; Tue, 15 Mar 2016 05:11:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1afl0j-00039y-PG for submit@debbugs.gnu.org; Tue, 15 Mar 2016 05:11:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afl0d-0001Kr-SO for submit@debbugs.gnu.org; Tue, 15 Mar 2016 05:11:24 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afl0d-0001Kn-Oq for submit@debbugs.gnu.org; Tue, 15 Mar 2016 05:11:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afl0Y-0006nC-PY for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 05:11:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afl0V-0001Hl-Bl for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 05:11:18 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:51332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afl0V-0001HW-2w for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 05:11:15 -0400 Original-Received: (qmail 8762 invoked by uid 3782); 15 Mar 2016 09:11:13 -0000 Original-Received: from acm.muc.de (p548A54E8.dip0.t-ipconnect.de [84.138.84.232]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 15 Mar 2016 10:11:11 +0100 Original-Received: (qmail 3166 invoked by uid 1000); 15 Mar 2016 09:13:55 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) 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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114932 Archived-At: Hello, Emacs. When parse-partial-sexp finishes a parse, it fails to record whether or not its end point is just after the first character of a two character comment starter or ender. When the resulting state is used as an argument to resume the parse, p-p-s will be unaware that the comment has started or ended and produce false results. Proposed solution: Add an extra element to the parser state, recording the syntax of the last character passed over before the end of the parse. This would be used by parse-partial-sexp to initialise its parse. Also: the existing element 9 (the list of currently open parens) and the new element should be explicitly documented in the Elisp manual, together with a statement that there may be further elements in the parse state used internally by parse-partial-sexp (for future expansion). -- Alan Mackenzie (Nuremberg, Germany).