bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48738: [PATCH] Optimized `describe-variable' predicate


From: Daniel Mendler
Subject: bug#48738: [PATCH] Optimized `describe-variable' predicate
Date: Mon, 31 May 2021 07:00:06 +0200

On 5/31/21 6:55 AM, Lars Ingebrigtsen wrote:
> Thanks; applied to Emacs 28 with some changes -- I thought the
> `ignore-errors' logic was kinda unclear, so I rewrote that bit using an
> explicit `condition-case' checking for the error thrown in this case.

Makes sense. Thanks for applying the patch.

> Adjusted patch included below; hopefully I didn't introduce any errors
> here...
> 
>> Ideally there would be a `buffer-local-boundp` predicate we could use
>> here.
> 
> Yes, that would be nice, I think.
> 
> And we probably have a lot of code in Emacs that uses
> `with-current-buffer' instead of `buffer-local-value' that could be
> similarly optimised (but I guess it mostly only makes sense to do so
> when it's called in an intensive loop like here).

Yes, when I find such case I will report them or provide a patch.
However it really matters in very few cases. Here the predicate is
called 10k+ times when generating all completions.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]