From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel,gmane.emacs.help Subject: Re: List of major modes? Date: Fri, 11 Nov 2005 21:51:03 +0000 Message-ID: <976C42B7-60B9-4A3A-8BC7-7FB81E2F5FE1@gmail.com> References: <4374ED02.20904@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1131745974 17052 80.91.229.2 (11 Nov 2005 21:52:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Nov 2005 21:52:54 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org, Drew Adams , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 11 22:52:52 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eagnk-0006Wt-V1 for ged-emacs-devel@m.gmane.org; Fri, 11 Nov 2005 22:51:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eagnk-0003ii-CM for ged-emacs-devel@m.gmane.org; Fri, 11 Nov 2005 16:51:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Eagnb-0003iL-J0 for emacs-devel@gnu.org; Fri, 11 Nov 2005 16:51:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Eagna-0003hw-Oq for emacs-devel@gnu.org; Fri, 11 Nov 2005 16:51:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eagna-0003hs-HJ for emacs-devel@gnu.org; Fri, 11 Nov 2005 16:51:06 -0500 Original-Received: from [64.233.162.192] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Eagna-00054e-OG for emacs-devel@gnu.org; Fri, 11 Nov 2005 16:51:06 -0500 Original-Received: by zproxy.gmail.com with SMTP id 9so282707nzo for ; Fri, 11 Nov 2005 13:51:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=TiOEGe5r5on0bmfWYlCNC3XTGC0DfzljCtuMpQTqThi9C2ZxRyqF7ip7PyEnmmssy1KKcLQeQZTSSPqOB6ortmk8lrttg+dP7feMzAq/6fADCmgztJjQ7q1rjrGiaR9O6aWyY5T/uaV4SAeJQll2M/vjM5pVFMjZ/2DfgX9g1ew= Original-Received: by 10.65.218.2 with SMTP id v2mr2858592qbq; Fri, 11 Nov 2005 13:51:05 -0800 (PST) Original-Received: from ?129.215.174.81? ( [129.215.174.81]) by mx.gmail.com with ESMTP id e15sm561636qba.2005.11.11.13.51.04; Fri, 11 Nov 2005 13:51:05 -0800 (PST) In-Reply-To: <4374ED02.20904@student.lu.se> Original-To: Lennart Borgman X-Mailer: Apple Mail (2.746.2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:45778 gmane.emacs.help:31000 Archived-At: 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.