unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Reitter <david.reitter@gmail.com>
Cc: Help-gnu-emacs@gnu.org, Drew Adams <drew.adams@oracle.com>,
	Emacs Devel <emacs-devel@gnu.org>
Subject: Re: List of major modes?
Date: Fri, 11 Nov 2005 21:51:03 +0000	[thread overview]
Message-ID: <976C42B7-60B9-4A3A-8BC7-7FB81E2F5FE1@gmail.com> (raw)
In-Reply-To: <4374ED02.20904@student.lu.se>

On 11 Nov 2005, at 19:12, Lennart Borgman wrote:

> Drew Adams wrote:
>
>> Recent Emacs versions have `minor-mode-list' (not alist), a list  
>> of all
>> minor mode functions. There is no guarantee that it will be complete,
>> however. It is fed by `add-minor-mode'.
>>
> Would it not be best to make something similar for major modes?  
> There are some requirements for what major modes should do and why  
> not add a new requirement? It will not be very difficult to add it  
> and many users would surely like it.

Changing the conventions for major modes wouldn't work that well,  
since that would basically create an incompatibility.

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. 

  reply	other threads:[~2005-11-11 21:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-11 17:56 List of major modes? 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 [this message]
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
     [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-09  9:40 David Reitter
2005-11-09 18:02 ` Edward O'Connor
2005-11-09 19:03 ` Kevin Rodgers
     [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

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=976C42B7-60B9-4A3A-8BC7-7FB81E2F5FE1@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=Help-gnu-emacs@gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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).