[Top][All Lists]

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

Re: List of major modes?

From: Stefan Monnier
Subject: Re: List of major modes?
Date: Mon, 14 Nov 2005 14:32:43 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> * The major mode should usually have its own keymap, which is used
>> as the local keymap in all buffers in that mode.  The major mode
>> command should call `use-local-map' to install this local map.
>> *Note Active Keymaps::, for more information.
>> This keymap should be stored permanently in a global variable named
>> `MODENAME-mode-map'.  Normally the library that defines the mode
>> sets this variable.
>> So you could check (keymapp (intern-soft (concat mode "-map"))) in the
>> apropos-internal PREDICATE.
> What about autoloading?

Indeed, it's very difficult to tell the difference between an autoloaded
major mode and some other autoloaded function whose name ends in `-mode'.

If the autoload is complete (i.e. generated by a recent autoload.el), then
it'll include the arg list, in which case we can check whether the arglist
is empty (as the convention says).

This said, I'm still not sure why you'd want a list of major modes.


reply via email to

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