unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: List of major modes? // "switch-to-mode"??
Date: Fri, 11 Nov 2005 11:04:43 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICKEKJCOAA.drew.adams@oracle.com> (raw)
In-Reply-To: <2679671F-4743-47EF-95F5-6BB303B0D626@gmail.com>

    thanks for your detailed explanations. Icicles is very useful indeed.

    Too bad the package installs stuff right upon loading (and actually
    activates the mode as well!), which it shouldn't do...

It should do just what it does. It follows the conventions for a minor mode.
Those conventions were discussed recently in emacs-devel (e.g. wrt a non-nil
initial value for the mode), and I've confirmed that Icicles is doing things
the right way in this regard.

You can easily prevent activating the mode upon load. Simply put this in
your .emacs, before loading icicles.el.

 (setq icicle-mode nil)

The mode will then be inactive when you load the library, and remain so
until you explicitly activate it.

    I'll look more into configuration things later.

There's nothing to configure, unless you want to change some of the
user-option values.

    For now, I'll try to find a predicate that reliably determines a list
    of major modes. That isn't trivial, as the ongoing discussion shows.
    In particular when only autoload information is available, it seems
    like it's pretty much impossible.
    This is sad, because a novice user would certainly be interested in a
    list of installed major modes.

See my previous message - I doubt you will find a fool-proof test for
major-modeness that correctly excludes minor modes.

If you have control over the installation (e.g. Aquamacs), then why can't
you test against an explicit list of the known, installed major modes?

Another possibility (workaround) is to augment your predicate with a test
against a known list of minor modes that aren't in `minor-mode-alist' etc.

HTH - Drew

  reply	other threads:[~2005-11-11 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-11 12:27 List of major modes? // "switch-to-mode"?? David Reitter
2005-11-11 17:00 ` Drew Adams
2005-11-11 18:45   ` David Reitter
2005-11-11 19:04     ` Drew Adams [this message]
2005-11-11 19:30 ` Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2005-11-12  2:09 David Reitter

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=DNEMKBNJBGPAOPIJOOICKEKJCOAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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.
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).