|
From: | Lennart Borgman |
Subject: | Re: List of major modes? |
Date: | Fri, 11 Nov 2005 23:18:50 +0100 |
User-agent: | Mozilla Thunderbird 1.0.7 (Windows/20050923) |
David Reitter wrote:
The following dynamic definition seems to "sort of" work. (defun major-modes () (apropos-internal "-mode\\'" (lambda (mode) (and (commandp mode) (not (string-match "\\`turn-\\(on\\|off\\)-" (symbol-name mode))) (not (assq mode minor-mode-list))))))I don't know, however, whether minor-mode-list is complete, i.e. whether it contains the not-yet-auto-loaded minor modes. From what I see in easy-mmode.el, it doesn't look like it.
Maybe I should change my mind. It looks good. If you marry this with the code in describe-mode you can perhaps populate minor-mode-list first with all minor modes. At least it seems so in that code. (Older minor modes seems to be in minor-mode-alist.)
[Prev in Thread] | Current Thread | [Next in Thread] |