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

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

Re: List of major modes? // "switch-to-mode"??


From: David Reitter
Subject: Re: List of major modes? // "switch-to-mode"??
Date: Fri, 11 Nov 2005 12:27:21 +0000

Thanks for your help with this.

Here is my fusion of your code, not using the documentation strings, but using apropos-internal to speed things up:

(apropos-internal
"-mode\\'"
(lambda (mode)
   (and (commandp mode)
        (not (string-match "\\`turn-\\(on\\|off\\)-"
                           (symbol-name mode)))
        (not (assq mode minor-mode-alist)))))


Here's why I wanted this:

I'd like to come up with a function switch-to-buffer that could be used interactively instead of M-x, with the advantage that completion would only complete mode names, and it would be able to display a list of modes (together with the first lines of their documentation strings) .

Has anyone already written something like this? (or is there an Emacs function that I don't know of...?)




reply via email to

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