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

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

bug#44232: (no subject)


From: Lars Ingebrigtsen
Subject: bug#44232: (no subject)
Date: Mon, 26 Oct 2020 17:51:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>> As for the specific suggestion: it sounds somewhat kludgey to me.  Why
>>> not take the Emacsy way: add a defcustom that lists major modes whose
>>> users are unlikely to want this mode turned on, and let the default
>>> value include the modes you think belong to that group.
>>
>> Is this how other globalized minor modes work?  I tried poking around
>> but couldn't really see any patterns...
>
> Does whitespace-enable-predicate fit the bill?

That's basically the same as highlight-changes-global-modes, but with
the added

         ;; ...the buffer is not internal (name starts with a space)
         (not (eq (aref (buffer-name) 0) ?\ ))
         ;; ...the buffer is not special (name starts with *)
         (or (not (eq (aref (buffer-name) 0) ?*))

So that's kinda kludgy.

And the syntax for highlight-changes-global-modes was simpler than I
thought when skimming -- it requires the `not' to be the first element,
etc, so it's not really that flexible.

Perhaps `define-globalized-minor-mode' should take a keyword to create
one of these defcustoms (with semantics like I sketched previously)...
then there'd be more opportunity for shared behaviour.

I'll take a whack at writing that.

-- 
(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]