all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 44232@debbugs.gnu.org, jidanni@jidanni.org
Subject: bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers
Date: Mon, 26 Oct 2020 17:19:25 +0100	[thread overview]
Message-ID: <87sga1x8mq.fsf@gnus.org> (raw)
In-Reply-To: <83eellf1px.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Oct 2020 17:26:02 +0200")

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





  reply	other threads:[~2020-10-26 16:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26  7:44 bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers 積丹尼 Dan Jacobson
2020-10-26 10:55 ` Lars Ingebrigtsen
2020-10-26 11:09   ` 積丹尼 Dan Jacobson
2020-10-26 11:17     ` Lars Ingebrigtsen
2020-10-26 15:26       ` Eli Zaretskii
2020-10-26 16:19         ` Lars Ingebrigtsen [this message]
2020-10-26 16:39           ` Basil L. Contovounesios
2020-10-26 16:51             ` bug#44232: (no subject) Lars Ingebrigtsen
2020-10-26 17:15               ` bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers Basil L. Contovounesios
2020-10-26 17:31                 ` Lars Ingebrigtsen
2020-10-26 20:07                   ` Basil L. Contovounesios
2020-10-26 22:06               ` bug#44232: (no subject) Dmitry Gutov
2020-10-26 17:06           ` bug#44232: global-display-fill-column-indicator-mode vs. readonly buffers Eli Zaretskii
2020-10-26 18:22             ` Lars Ingebrigtsen
2020-10-26 18:26               ` Lars Ingebrigtsen
2020-10-26 18:40                 ` Eli Zaretskii
2020-10-26 18:45                   ` Lars Ingebrigtsen
2020-10-26 18:51                   ` Lars Ingebrigtsen
2020-10-26 19:17                     ` Eli Zaretskii
2020-10-26 19:20                       ` Lars Ingebrigtsen
2020-10-26 19:39                         ` Eli Zaretskii
2020-10-26 19:45                           ` Lars Ingebrigtsen
2020-10-26 16:09     ` Eli Zaretskii
2020-10-26 16:25       ` 積丹尼 Dan Jacobson
2020-10-26 17:11         ` Eli Zaretskii
2020-10-26 22:28           ` 積丹尼 Dan Jacobson
2020-10-27  3:36             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sga1x8mq.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=44232@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=jidanni@jidanni.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.