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: problem of define-minor-mode while bootstrapping Date: Thu, 03 Oct 2002 23:49:24 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200209191320.WAA03733@etlken.m17n.org> <200209191346.g8JDkdq07175@rum.cs.yale.edu> <200209200006.JAA04300@etlken.m17n.org> <200209201838.g8KIc8t13414@rum.cs.yale.edu> <20020921020041.GA1545@gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1033713823 7049 127.0.0.1 (4 Oct 2002 06:43:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2002 06:43:43 +0000 (UTC) Cc: miles@gnu.org, monnier+gnu/emacs@rum.cs.yale.edu, handa@m17n.org, 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 17xMBV-0001p1-00 for ; Fri, 04 Oct 2002 08:43:37 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17xMwz-0001Md-00 for ; Fri, 04 Oct 2002 09:32:42 +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 17xLx0-0006tv-00; Fri, 04 Oct 2002 02:28:38 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17xJSz-0003mA-00 for emacs-devel@gnu.org; Thu, 03 Oct 2002 23:49:29 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17xJSw-0003lX-00 for emacs-devel@gnu.org; Thu, 03 Oct 2002 23:49:27 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17xJSv-0003lK-00 for emacs-devel@gnu.org; Thu, 03 Oct 2002 23:49:25 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 17xJSu-0005Qa-00; Thu, 03 Oct 2002 23:49:24 -0400 Original-To: d.love@dl.ac.uk In-reply-to: (message from Dave Love on 02 Oct 2002 23:49:32 +0100) 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:8367 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8367 I don't understand the problem with this. Those issues are well-known, and various packages have been modified to avoid them, as discussed with you. This is in (elisp)Coding Conventions anyhow: * When a package provides a modification of ordinary Emacs behavior, it is good to include a command to enable and disable the feature, Provide a command named `WHATEVER-mode' which turns the feature on or off, and make it autoload (*note Autoload::). Design the package so that simply loading it has no visible effect--that should not enable the feature.(2) Users will request the feature by invoking the command. Simply loading a file should not enable its features. But if you first do something that explicitly asks for its features to be enabled, then load the file, that is a different issue entirely. In this case, you are not *just* loading the file. It used to be that minor modes were always controlled by variables. Setting or binding the variable was the way to enable the minor mode. For user convenience, there were commands to do toggle or set the variable. As a result of define-minor-mode, this is not true any more. There are now some minor modes you cannot enable just by setting or binding a variable. But many minor modes still can be enabled that way. Therefore, the ones that can't be enabled that way should have doc strings to say so. However, it is a useful feature that if the user just sets the variable in .emacs before loading the file, that does manage to enable the variable.