From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: List of major modes?
Date: Wed, 09 Nov 2005 12:03:51 -0700 [thread overview]
Message-ID: <dkth6q$d0e$1@sea.gmane.org> (raw)
In-Reply-To: <CA10DB18-86EF-4AD3-A891-106637AAFC9D@gmail.com>
David Reitter wrote:
> How would I go about compiling a list of all major modes available in
> the current emacs session?
> (Both loaded ones and autoloadable ones.)
>
> My first thought was doing something like
>
> (apropos-internal ".*-mode$")
>
> which works, but doesn't distinguish between major and minor modes,
> which would be important.
>
> I cannot actually run any of the mode functions (would take way too
long).
>
> From looking at the elisp level code, there is very little
> programmatic distinction between minor and major modes, at least
> nothing that could be easily detected.
Here's the best I could come up with:
(apropos-internal "-mode\\'"
(lambda (mode)
(and (commandp mode)
(string-match "\\`Major mode\\>"
(documentation mode)))))
--
Kevin Rodgers
next prev parent reply other threads:[~2005-11-09 19:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-09 9:40 List of major modes? David Reitter
2005-11-09 18:02 ` Edward O'Connor
2005-11-09 19:03 ` Kevin Rodgers [this message]
[not found] ` <mailman.14613.1131563363.20277.help-gnu-emacs@gnu.org>
2005-11-10 1:04 ` rgb
2005-11-10 1:15 ` Lennart Borgman
[not found] ` <mailman.14670.1131585340.20277.help-gnu-emacs@gnu.org>
2005-11-10 1:34 ` rgb
[not found] <mailman.14537.1131532545.20277.help-gnu-emacs@gnu.org>
2005-11-09 17:05 ` rgb
-- strict thread matches above, loose matches on Subject: below --
2005-11-11 17:56 David Reitter
2005-11-11 18:35 ` Henrik Enberg
2005-11-11 18:51 ` Drew Adams
2005-11-11 19:12 ` Lennart Borgman
2005-11-11 21:51 ` David Reitter
2005-11-11 22:18 ` Lennart Borgman
2005-11-14 16:26 ` Kevin Rodgers
2005-11-14 16:40 ` Lennart Borgman
2005-11-14 19:32 ` Stefan Monnier
2005-11-15 5:43 ` Richard M. Stallman
2005-11-15 10:22 ` Alan Mackenzie
2005-11-15 18:21 ` Kevin Rodgers
2005-11-15 23:22 ` Richard M. Stallman
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='dkth6q$d0e$1@sea.gmane.org' \
--to=ihs_4664@yahoo.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).