From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: A proposal for the future of open-paren-in-column-0-is-defun-start. Date: Mon, 6 Apr 2020 22:08:20 +0300 Message-ID: References: <20200405134735.GD5049@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="101701"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 To: Alan Mackenzie , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 06 21:08:56 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLX7A-000QNl-K7 for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 21:08:56 +0200 Original-Received: from localhost ([::1]:37298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLX79-0007jZ-M7 for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 15:08:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51458) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLX6f-00079s-PL for emacs-devel@gnu.org; Mon, 06 Apr 2020 15:08:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLX6e-0001q0-PV for emacs-devel@gnu.org; Mon, 06 Apr 2020 15:08:25 -0400 Original-Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:46907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLX6e-0001oP-JS for emacs-devel@gnu.org; Mon, 06 Apr 2020 15:08:24 -0400 Original-Received: by mail-wr1-x42d.google.com with SMTP id j17so759538wru.13 for ; Mon, 06 Apr 2020 12:08:24 -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=snllToKqXyHcb3umPRMN65i+E+DGlFqHDHumkCUbM3k=; b=QqZWD//IrI1O6ngkWexuMCmAcw9LONMp61IX9FMuIfjDJo3Gao/M7bQd3A6ekaF4eD lQbUlKcUGerBxfHhPRMa/ZV69OuWqbLN4iq0sRtJiqgr1FneOPtzPCPcItF7cQfHdRwG IvjAf4b4J4ut0OknTE/zg9h3LX7JWeY8Gs+eemCUdLpjur271hk25sZ6mE9jIAJchYA7 0ZqMq7u4vyGQC63rwJbtNOJvdYjy+qwxB/5Ec6cfkbC6toSqr7Dz9oc3jXEHnWRhunAi ijYThFHh1pZ0Qiuyvo26Hvknr1Y3KPMo91gFcuc3Fh1OyU7nOZkf9YDCssRFJIrqRFLB kTlQ== 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=snllToKqXyHcb3umPRMN65i+E+DGlFqHDHumkCUbM3k=; b=EkdmGzDl32/x0TRwYuc5QosLrXntnWUJ7P7KqA6kLWV/tWjOA4gMjiH6z5rs46pz9m +/xuCWG7atoq1Ot07wE+7f3twr+199aQgwMSFwMbXb1Lptp6q7vuWUeT4i0YqNqnm2Yv E0dDyVxvO59hkAmR7OOYg5i4iydy62qixqYdUCIKx27VdkIPFYnAhBEKT5YcKDJWwHvS v2PpbkClutZEdoZyiTqd5H8SLnej9OPXYGlRiRXJ3KC3qP+SiEqbsaTnsJce4VYZFafO vBo0z/K8ljUl7py5qb/FL9xR9tkBDrYxA+9LxOBAdO0Hnr/dua+zfDEyGOZ2HrpGEZ+Y 0q3g== X-Gm-Message-State: AGi0PuZwzQ4gqSsw6JSbQ7HZ2fdBn8+o3wKcw2VpprSEfy4rhIBZGJZf N7yy68SlEqmm7yxEdUH/m/EIIRIfugE= X-Google-Smtp-Source: APiQypK9QvZrOMO4y7kVStRuo8VkHLTIN9evrdk8leJjWYqLcWtWcnO6kUWEQBvs0VH9UH2vH6y28w== X-Received: by 2002:a5d:4844:: with SMTP id n4mr735281wrs.314.1586200102532; Mon, 06 Apr 2020 12:08:22 -0700 (PDT) Original-Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id f62sm584967wmf.44.2020.04.06.12.08.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2020 12:08:21 -0700 (PDT) In-Reply-To: <20200405134735.GD5049@ACM> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246559 Archived-At: Hi Alan, On 05.04.2020 16:47, Alan Mackenzie wrote: > `syntax-open-paren-in-literal' would be applied throughout the buffer > when it is first loaded into Emacs, and would be kept up to date by > "super before/after-change-functions". (These functions would be called > at buffer changes regardless of the value of inhibit-modification-hooks. > We would want some way of inhibiting them being called on a change of > text properties, for efficiency's sake). > > With this mechanism in place, o-p-i-c-0-i-d-s could safely be left > enabled, for speed's sake, without causing the all too familiar bugs in > CC Mode. > > What do people think? While I'm not convinced that syntax-ppss is a significant bottleneck now, nor crazy about the idea of yet another kind of hooks which will have to scan the whole buffer after every buffer change, I say go for it. :-) The proposed approach seems easy enough to implement, and then you could do some real-world benchmarks (something like: 1. scrolling 50 times, 2. typing new code in a big file, 3. simply visiting a big file), compare and see what improved, and what didn't, and by how much. Then we'd have something to discuss, at least.