From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Recent attempts at standardizing major mode definitions. Date: Tue, 03 Sep 2002 09:26:53 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200209020240.VAA26083@eel.dms.auburn.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1031059796 8501 127.0.0.1 (3 Sep 2002 13:29:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Sep 2002 13:29:56 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17mDkh-0002D0-00 for ; Tue, 03 Sep 2002 15:29:55 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17mEJQ-0007Me-00 for ; Tue, 03 Sep 2002 16:05:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17mDmG-0004r3-00; Tue, 03 Sep 2002 09:31:32 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17mDhn-00045H-00 for emacs-devel@gnu.org; Tue, 03 Sep 2002 09:26:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17mDhl-00044u-00 for emacs-devel@gnu.org; Tue, 03 Sep 2002 09:26:54 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17mDhl-00044o-00 for emacs-devel@gnu.org; Tue, 03 Sep 2002 09:26:53 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 17mDhl-0002NS-00; Tue, 03 Sep 2002 09:26:53 -0400 Original-To: teirllm@dms.auburn.edu In-Reply-To: <200209020240.VAA26083@eel.dms.auburn.edu> (message from Luc Teirlinck on Sun, 1 Sep 2002 21:40:13 -0500 (CDT)) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7376 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7376 The second, more recent purpose is as a "standard" way to define any major mode whatsoever. Stefan started using define-derived-mode for this, but I rejected the idea. He had already converted a few modes, and not all of them have been changed back. Defining a macro define-major-mode might be a good idea. (put 'mymode 'derived-mode-parent 'nil) There is no need for that--nil is the default. (defun mymode nil "docstring\n\nThis mode runs the hook `mymode-hook', as the final step\nduring initialization.\n\n\\{mymode-map}" We don't always want to use \\{...} in every major mode doc string. Major modes usually should have their own keymap... There is a "usually" in this sentence. So maybe define-major-mode should also take a keymap argument. This is a lot less clear than it is for syntax-tables and abbrev-tables however. Would you like to look at all the major modes and see which ones don't have keymaps? It could be that fundamental-mode is the only one.