emacs-devel
[Top][All Lists]
Advanced

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

Re: master 760910f: Add a new buffer-local variable `minor-modes'


From: Lars Ingebrigtsen
Subject: Re: master 760910f: Add a new buffer-local variable `minor-modes'
Date: Sun, 14 Feb 2021 19:40:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Even if we had a function like that, looping over all possible minor
>> modes and calling predicates for them sounds hopelessly slow when you
>> have to do this for thousands of symbols...
>
> You could do it eagerly just once before calling all the predicate
> functions for all the commands, so that'd be cheap.

That's true, but it seems like an unnecessary complication.

For instance, the mode line contains `minor-mode-alist', and has to loop
through it to find the lighters to display.  It could instead work off
of the `minor-mode' list, which is order(s) of magnitude shorter for most
people.

(And whatever mechanism we add for global modes.  Just adding a
`global-minor-modes' variable is the obvious solution, but I was hoping
somebody had a non-obvious alternative.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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