From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: New hook before-region-change-functions wanted Date: Fri, 8 Sep 2017 23:47:51 +0300 Message-ID: <105d75ed-0c98-8b58-123e-bfab34aebc3f@yandex.ru> References: <20170908144657.GA3463@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1504903728 12104 195.159.176.226 (8 Sep 2017 20:48:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Sep 2017 20:48:48 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 To: Alan Mackenzie , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 08 22:48:41 2017 Return-path: Envelope-to: ged-emacs-devel@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 1dqQCZ-0002JH-Q7 for ged-emacs-devel@m.gmane.org; Fri, 08 Sep 2017 22:48:35 +0200 Original-Received: from localhost ([::1]:47267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqQCc-0006VT-BA for ged-emacs-devel@m.gmane.org; Fri, 08 Sep 2017 16:48:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqQC1-0006Us-2v for emacs-devel@gnu.org; Fri, 08 Sep 2017 16:48:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqQBy-00013n-0j for emacs-devel@gnu.org; Fri, 08 Sep 2017 16:48:01 -0400 Original-Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:38370) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dqQBx-000118-Op for emacs-devel@gnu.org; Fri, 08 Sep 2017 16:47:57 -0400 Original-Received: by mail-lf0-x22a.google.com with SMTP id q132so7952886lfe.5 for ; Fri, 08 Sep 2017 13:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dJFHIk3v2Bpck9YrqBKeOWpGcuOPV5wyp4crmFhx2qw=; b=QZ/WJwFtalnVspfvhX3VCSGvH24OnvAp1oRkguXqROplj2Au50gX7kq+SKS82lBjcq 8s441xWxd+fsngILTjC2FBWyneKcLa5sc2NmVZQ7CKXRbujRXPdyQFSv40Fz62LQRcYi ZAbgTiG9zVVxxIwaguKmNjYE6ZEPtMXhJKc2OUdDfMpLc7OCHQtvioWYayE3SU+z3ptA 0QnIvA6E9rjC6ZJHF3pEpLu48ToSOvPQdsDRFpR3nXKP1NzosHwioSaRLr7Gc+nuzcaJ /ESY/156647RG4jCpHhQP7SODQWYmLfVtPqqx/FBSCeShBzNDwini+qjoi+8inI7Cq7b IbFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dJFHIk3v2Bpck9YrqBKeOWpGcuOPV5wyp4crmFhx2qw=; b=KCewRHAeCevHFJQIBrUWG9fjBLUABkL1qlaYKmESOriuNKlM6BcuAkVVcQ51B8H+bY /eIMiBXkXbv0u7fU/7NpztdHxmYXjY5gwFb8lkaQ/z5qLCwqpuB5p5uQ+RmmIaq2L+e5 /1isO9uD/3fzjxLslYRhSK2uZzpU7WMOeRCSk9Z8V2Sh5hXF2NWvywvF6hEQwhe7jZxZ KrCBDFhqCOBiePrD70Wg1CwN4YTfMIWGrZRMbNaPv+CND4rFAEKN24C+cOGY4KxxSPC0 GipDdHOadI1xopDikcGdJAa5EcvTZXY+7tLRPR+u6Y1kBKDgMJdY0LN88T60NjAKUXXs 5sTw== X-Gm-Message-State: AHPjjUj7yq04pP4FNuZ2qAKLSIonJDSBLyXLyNbOQq/aCVObQ6uCx2zI 8B9ZhdTMz3f44/GAGAg= X-Google-Smtp-Source: AOwi7QBDe9Dnus5wBvOFxC/wHOo87vxFbV5CsXJQwbn3z/+vRfia9s5esBa2Za8pt1kBGO+vX/vWsw== X-Received: by 10.46.33.226 with SMTP id h95mr1374486lji.3.1504903674781; Fri, 08 Sep 2017 13:47:54 -0700 (PDT) Original-Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id n13sm487780lja.7.2017.09.08.13.47.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Sep 2017 13:47:53 -0700 (PDT) In-Reply-To: <20170908144657.GA3463@ACM> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22a 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:218031 Archived-At: On 9/8/17 5:46 PM, Alan Mackenzie wrote: > While it is true that this hook is not absolutely necessary, +1 > in that the > cache switch could be made by the first call to syntax-ppss after the > region change, it makes the cache switch clean. In particular, the > cache will always be in synch with the region, and any functions which > examine the cache at an arbitrary time (for example, jit-lock > functions), will get the right cache. Do we ever want the jit-lock code examining the cache contents directly? > The mechanism will also work a > little faster with the new hook than without it, given that changes of > restriction are more rarely effected than syntax-ppss is called. I don't imagine the performance difference will be in any way noticeable. It's just one "if".