From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: `define-minor-mode' makes erroneous docstrings. Date: Tue, 12 Apr 2005 13:23:35 -0400 Message-ID: References: <200504120245.j3C2jWQ11924@raven.dms.auburn.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1113326714 11983 80.91.229.2 (12 Apr 2005 17:25:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2005 17:25:14 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 12 19:25:12 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DLP7d-0002rn-K5 for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2005 19:24:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLOhz-0002xN-LH for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2005 12:57:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DLOg4-0002Q3-OK for emacs-devel@gnu.org; Tue, 12 Apr 2005 12:55:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DLOg1-0002Nr-2I for emacs-devel@gnu.org; Tue, 12 Apr 2005 12:55:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLOg0-0002Lt-Jx for emacs-devel@gnu.org; Tue, 12 Apr 2005 12:55:48 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DLP7E-0002A9-L6 for emacs-devel@gnu.org; Tue, 12 Apr 2005 13:23:56 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DLP6t-0007Eq-TQ; Tue, 12 Apr 2005 13:23:36 -0400 Original-To: Luc Teirlinck In-reply-to: <200504120245.j3C2jWQ11924@raven.dms.auburn.edu> (message from Luc Teirlinck on Mon, 11 Apr 2005 21:45:32 -0500 (CDT)) 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:35901 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35901 The docstrings provided by `define-minor-mode' are wrong for many minor-mode variables. They _automatically_ say that setting the variable directly has no effect. I believe that this is wrong for the majority of minor modes. Would it work to try to distinguish by whether the "body" of the define-minor-mode form is empty? If it is non-empty, then it contains forms that will be executed by the function. Just setting the variable won't execute those forms, which means just setting the variable probably isn't right. If the body is empty, then I think just setting the variable will work. As regards mode hooks, I agree it is a mistake to associate mode hooks with the modes that, aside from their hooks, are fully controlled by variables. Maybe this means we should give define-minor-mode a new option to control whether to make a hook.