help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: List of major modes?


From: rgb
Subject: Re: List of major modes?
Date: 9 Nov 2005 17:04:01 -0800
User-agent: G2/0.2

> Here's the best I could come up with:
>
> (apropos-internal "-mode\\'"
>                    (lambda (mode)
>                      (and (commandp mode)
>                           (string-match "\\`Major mode\\>"
>                                         (documentation mode)))))

Slick.
It needed a slight tweek on my machine running CVS Emacs.
(documentation mode) would sometimes return nil and blow up
string-match.  tooltip-mode was one that returned nil.  I don't
understand why though.  It does seem to be documented.... hmm.

(apropos-internal "-mode\\'"
                   (lambda (mode)
                     (and (commandp mode) (message "%s" mode)
                          (string-match "\\`Major mode\\>"
                                        (concat "" (documentation
mode))))))



reply via email to

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