[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: List of major modes?
From: |
Alan Mackenzie |
Subject: |
Re: List of major modes? |
Date: |
Tue, 15 Nov 2005 10:22:01 +0000 (GMT) |
On Mon, 14 Nov 2005, Kevin Rodgers wrote:
>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.
>I still think it would be better to include functions that follow the
>major mode conventions than to exclude functions that don't follow the
>minor mode conventions. The Emacs Lisp manual has nodes describing both
>sets of conventions.
It is impossible to create a list of major modes, because a major mode is
simply a lisp function, with nothing definitive to distinguish it from
any other lisp function.
So how about having a property `emacs-mode' on symbols, with valid values
(major minor major-minor nil)? Getting a list of major modes would then
be trivial. (OK, for Emacs 23. ;-)
>--
>Kevin Rodgers
--
Alan Mackenzie (Munich, Germany)
- Re: List of major modes?, Lennart Borgman, 2005/11/11
- Re: List of major modes?, David Reitter, 2005/11/11
- Re: List of major modes?, Lennart Borgman, 2005/11/11
- Re: List of major modes?, Kevin Rodgers, 2005/11/14
- Re: List of major modes?, Richard M. Stallman, 2005/11/15
- Re: List of major modes?, Lennart Borgman, 2005/11/15
- Re: List of major modes?, Stefan Monnier, 2005/11/15
- Re: List of major modes?, Richard M. Stallman, 2005/11/15
- Re: List of major modes?,
Alan Mackenzie <=
- Re: List of major modes?, Richard M. Stallman, 2005/11/15
- Re: List of major modes?, David Reitter, 2005/11/16
- Re: List of major modes?, Richard M. Stallman, 2005/11/17
- Re: List of major modes?, Lennart Borgman, 2005/11/17
- Re: List of major modes?, Juri Linkov, 2005/11/19
- Re: List of major modes?, Richard M. Stallman, 2005/11/20