|
From: | Dmitry Gutov |
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 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |