From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.help Subject: Re: List of major modes? Date: Mon, 14 Nov 2005 14:32:43 -0500 Message-ID: References: <4374ED02.20904@student.lu.se> <976C42B7-60B9-4A3A-8BC7-7FB81E2F5FE1@gmail.com> <4378BE10.4040104@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1131996956 3505 80.91.229.2 (14 Nov 2005 19:35:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Nov 2005 19:35:56 +0000 (UTC) Cc: Kevin Rodgers , help-gnu-emacs@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 14 20:35:53 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ebk4e-0003s9-LR for ged-emacs-devel@m.gmane.org; Mon, 14 Nov 2005 20:33:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ebk4d-0004Lu-Sx for ged-emacs-devel@m.gmane.org; Mon, 14 Nov 2005 14:33:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ebk4P-0004LW-Et for emacs-devel@gnu.org; Mon, 14 Nov 2005 14:32:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ebk4N-0004KL-Qa for emacs-devel@gnu.org; Mon, 14 Nov 2005 14:32:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ebk4N-0004KI-Nj; Mon, 14 Nov 2005 14:32:47 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ebk4N-0005l8-Pw; Mon, 14 Nov 2005 14:32:47 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 8FD9C2CF6AD; Mon, 14 Nov 2005 14:32:46 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 660364AC00A; Mon, 14 Nov 2005 14:32:43 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 50B96E6C17; Mon, 14 Nov 2005 14:32:43 -0500 (EST) Original-To: Lennart Borgman In-Reply-To: <4378BE10.4040104@student.lu.se> (Lennart Borgman's message of "Mon, 14 Nov 2005 17:40:48 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.851, requis 5, autolearn=not spam, AWL 0.05, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca 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:45967 gmane.emacs.help:31049 Archived-At: >> * The major mode should usually have its own keymap, which is used >> as the local keymap in all buffers in that mode. The major mode >> command should call `use-local-map' to install this local map. >> *Note Active Keymaps::, for more information. >> >> This keymap should be stored permanently in a global variable named >> `MODENAME-mode-map'. Normally the library that defines the mode >> sets this variable. >> >> So you could check (keymapp (intern-soft (concat mode "-map"))) in the >> apropos-internal PREDICATE. >> > What about autoloading? Indeed, it's very difficult to tell the difference between an autoloaded major mode and some other autoloaded function whose name ends in `-mode'. If the autoload is complete (i.e. generated by a recent autoload.el), then it'll include the arg list, in which case we can check whether the arglist is empty (as the convention says). This said, I'm still not sure why you'd want a list of major modes. Stefan