[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44232: global-display-fill-column-indicator-mode vs. readonly buffer
From: |
Lars Ingebrigtsen |
Subject: |
bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers |
Date: |
Mon, 26 Oct 2020 17:19:25 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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...
But here's one that works along this way:
---
highlight-changes-global-modes is a variable defined in ‘hilit-chg.el’.
Its value is t
You can customize this variable.
Documentation:
Determine whether a buffer is suitable for global Highlight Changes mode.
A function means call that function to decide: if it returns non-nil,
the buffer is suitable.
A list means the elements are major modes suitable for Highlight
Changes mode, or a list whose first element is ‘not’ followed by major
modes which are not suitable.
A value of t means the buffer is suitable if it is visiting a file and
its name does not begin with ‘ ’ or ‘*’.
A value of nil means no buffers are suitable for ‘global-highlight-changes-mode’
(effectively disabling the mode).
Example:
(c-mode c++-mode)
means that Highlight Changes mode is turned on for buffers in C and C++
modes only.
---
So it's a complex
(c-mode (not text-mode) ...)
kind of thing that sounds like it could be generalised for globalized
minor modes. (Although I'd say use derived-mode-p instead of eq to
check.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, 積丹尼 Dan Jacobson, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Lars Ingebrigtsen, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, 積丹尼 Dan Jacobson, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Lars Ingebrigtsen, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Eli Zaretskii, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers,
Lars Ingebrigtsen <=
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Basil L. Contovounesios, 2020/10/26
- bug#44232: (no subject), Lars Ingebrigtsen, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Basil L. Contovounesios, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Lars Ingebrigtsen, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Basil L. Contovounesios, 2020/10/26
- bug#44232: (no subject), Dmitry Gutov, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Eli Zaretskii, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Lars Ingebrigtsen, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Lars Ingebrigtsen, 2020/10/26
- bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers, Eli Zaretskii, 2020/10/26