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

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

bug#44232: global-display-fill-column-indicator-mode vs. readonly buffer


From: Basil L. Contovounesios
Subject: bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers
Date: Mon, 26 Oct 2020 17:15:03 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> "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.

It's not quite the same thing, because whitespace-enable-predicate only
takes on function values, and is explicitly intended to be customised
with the existing DSL of add-function, rather than a new ad-hoc DSL.

[Not that I'd argue for the superiority of whitespace-enable-predicate
over other customisation approaches.]

-- 
Basil





reply via email to

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