|
From: | Dmitry Gutov |
Subject: | Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch |
Date: | Thu, 13 Feb 2014 16:12:04 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
On 13.02.2014 15:28, Stefan Monnier wrote:
Indeed, I don't think using an indirect buffer is a good solution. I'm not even sure it's faster than mmm's "manual" variable switch.
Why not? `switch-buffer' has to be faster than "iterate these lists, save values of symbols, set them to values from those alists".
Or do you mean that indirect buffers add their own overhead, just by having (and somehow coordinating, I guess) the same contents?
Not sure how best to speed it up. We could of course reduce the interpretation overhead by providing a kind of "context-switch" primitive written in C. This would probably speed it up significantly. But making it do really less work is difficult: there's the "local-variables" alist in the "struct buffer" which we could switch in one step, but: - it doesn't account for all local variables (doesn't account for those local-vars held directly in the "struct buffer" such as tab-width). - it would switch some vars which should not be switched.
This, together with a blacklist and a small "additional variables" list would still probably be a lot neater than mmm-vars.el:
https://github.com/purcell/mmm-mode/blob/master/mmm-vars.el#L111-L302
[Prev in Thread] | Current Thread | [Next in Thread] |