unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: so-long and special major modes
Date: Wed, 9 Dec 2020 09:08:45 +1300	[thread overview]
Message-ID: <06b2b38e-1d44-5a7e-b1c0-aac489989fde@orcon.net.nz> (raw)
In-Reply-To: <E1kmVa3-0001HU-Vj@fencepost.gnu.org>

On 8/12/20 6:30 pm, Richard Stallman wrote:
> Emacs distinguishes two kinds of major modes: those that are for a
> kind of data, and those that correspond to special applications.  In
> the former, q will self-insert.  In the latter, q probably means
> "quit".  The way to distinguish is to test the mode-class property of
> the major mode symbol.
> 
> Dired, Rmail and Info are examples of special major modes.
> 
> so-long-major-mode may be ok to use in an ordinary major mode, but it
> is no good in a special mode.  In that situation, it is necessary to
> use so-long-minor-mode.

In general I felt it was necessary to white-list the modes for which
it is acceptable for so-long to take action, because I don't think it's
possible to automatically detect every mode in which it might be
problematic.

The `so-long-target-modes' variable serves this purpose -- the automated
behaviour only kicks in for buffers using a major mode (or derivative
thereof) from this list.  That's (prog-mode css-mode sgml-mode nxml-mode)
by default.


-Phil



  reply	other threads:[~2020-12-08 20:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08  5:30 so-long and special major modes Richard Stallman
2020-12-08 20:08 ` Phil Sainty [this message]
2020-12-09  6:48   ` Richard Stallman
2020-12-09 10:46     ` Phil Sainty

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=06b2b38e-1d44-5a7e-b1c0-aac489989fde@orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).