From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch Date: Wed, 12 Feb 2014 06:24:01 +0200 Message-ID: <52FAF761.2020801@yandex.ru> References: <87r47bi1e5.fsf@yandex.ru> <52F96284.50507@yandex.ru> <52FAE12B.6060101@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1392179061 18823 80.91.229.3 (12 Feb 2014 04:24:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Feb 2014 04:24:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 12 05:24:28 2014 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 1WDRN4-0007jf-Gj for ged-emacs-devel@m.gmane.org; Wed, 12 Feb 2014 05:24:26 +0100 Original-Received: from localhost ([::1]:37223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDRN3-0007zw-Ip for ged-emacs-devel@m.gmane.org; Tue, 11 Feb 2014 23:24:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDRMs-0007zd-NC for emacs-devel@gnu.org; Tue, 11 Feb 2014 23:24:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDRMk-00018Z-A3 for emacs-devel@gnu.org; Tue, 11 Feb 2014 23:24:14 -0500 Original-Received: from mail-ea0-x22d.google.com ([2a00:1450:4013:c01::22d]:58317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDRMk-00018O-28 for emacs-devel@gnu.org; Tue, 11 Feb 2014 23:24:06 -0500 Original-Received: by mail-ea0-f173.google.com with SMTP id d10so4131660eaj.32 for ; Tue, 11 Feb 2014 20:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=CbJFDcb/mKOIaBDll4tTFghruzubVnU9XixtOTZkLVc=; b=x3rUndFfT0mSSyWXlal/GR4Q8N0CQdOOpEYHy6FD65qXzn33vzkwmS0VHsMvRBTqDY JgdDYUuD1s5f/4I+EbGFoBEHpQydv3GQzYl4rJ92N3PE/Dh8Ap9u1Afxpn3XtFczEuog SNKUT9v1P/Atd7XqcVT+nQhzukvL0TyGEZYT+nOtLcUdXZr+nHr5bQy1OASQHBVpU29N iYcN/5E9gQ66JNAtu2SEej8oToCCrLRab1hCnOhcDlwMsctcmak9rTHM0w3CqoVDPubB nLBWJtpSyC7AJrmHOFccmX6R7B9rgnsnPW3YvJUE+274nMoraGyec6+mwa9oGwsWmBsT jjOg== X-Received: by 10.14.95.134 with SMTP id p6mr975961eef.73.1392179045133; Tue, 11 Feb 2014 20:24:05 -0800 (PST) Original-Received: from [192.168.10.2] (62-36-157.netrun.cytanet.com.cy. [62.228.36.157]) by mx.google.com with ESMTPSA id 8sm75927287eeq.15.2014.02.11.20.24.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 20:24:04 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <52FAE12B.6060101@yandex.ru> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22d 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:169545 Archived-At: > On 12.02.2014 03:30, Stefan Monnier wrote: >> One option is to have a hook that takes a (POS . PPSS) pair, which >> syntax-ppss intends to use as a starting point for parsing, and return >> a new such pair to use instead, where the returned position should >> always be >= POS. A problem: suppose point is in a primary mode region, and POS is in a submode region above it. Then we can't use the value of PPSS at all. Does the hook re-scan the buffer from the beginning? On 12.02.2014 04:49, Dmitry Gutov wrote: > We call `syntax-ppss', happily report to it that the value at point (or > some position near it) can be used until point + 400. Then move a few > chars lower and delete the rest of the given region. NEXT-BOUNDARY > becomes stale, and calling `syntax-ppss' from the region below can > return a wrong value. I suppose this could be handled if `syntax-ppss-flush-cache' removed or modified the cache entries where NEXT-BOUNDARY is after BEG. And by modified, I mean set NEXT-BOUNDARY to BEG.