From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Bug #22983 (syntax-ppss returns wrong result) is still open. Could we fix it before the release, please. Date: Wed, 08 Jun 2016 08:43:43 -0400 Message-ID: References: <20160607220928.GA5155@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1465389798 7104 80.91.229.3 (8 Jun 2016 12:43:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2016 12:43:18 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 08 14:43:07 2016 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 1bAcp5-0003FB-Pn for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2016 14:43:03 +0200 Original-Received: from localhost ([::1]:56765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAcp5-0003ki-3w for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2016 08:43:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAcoo-0003UF-GF for emacs-devel@gnu.org; Wed, 08 Jun 2016 08:42:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAcoi-0001ZM-Gv for emacs-devel@gnu.org; Wed, 08 Jun 2016 08:42:45 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:53664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAcoi-0001Xw-9r for emacs-devel@gnu.org; Wed, 08 Jun 2016 08:42:40 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bAcoZ-0002lI-Q1 for emacs-devel@gnu.org; Wed, 08 Jun 2016 14:42:32 +0200 Original-Received: from 45.72.149.250 ([45.72.149.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jun 2016 14:42:31 +0200 Original-Received: from monnier by 45.72.149.250 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jun 2016 14:42:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 19 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 45.72.149.250 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:yy3bK0/nby/fJ7gbUDE/iD45h+Q= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:204235 Archived-At: > My suggestion for a fix, discussed in the thread for the bug, is to come > up with a new function similar to syntax-ppss which always returns the > equivalent of > (parse-partial-sexp 1 pos) > in place of syntax-ppss's > (parse-partial-sexp (point-min) pos) Almost agreed, except that something should be able to control the "1". Most/all users of `syntax-ppss' indeed want to start "from the beginning", but in some cases "the beginning" they want isn't 1 (hence things like font-lock-dont-widen). Ideally the "control" should not be specific to syntax.el and should make font-lock-dont-widen obsolete. Vitalie Spinu was working on such a patch. Stefan