From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: `define-minor-mode' makes erroneous docstrings. Date: Tue, 12 Apr 2005 12:04:46 -0500 (CDT) Message-ID: <200504121704.j3CH4kO15006@raven.dms.auburn.edu> References: <200504120245.j3C2jWQ11924@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1113325963 9235 80.91.229.2 (12 Apr 2005 17:12:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2005 17:12:43 +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:12:42 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DLOuS-0000Nn-Mu for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2005 19:10:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLOUo-0005hm-Fr for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2005 12:44:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DLOR2-0002Qe-Pk for emacs-devel@gnu.org; Tue, 12 Apr 2005 12:40:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DLOQp-0002LR-S2 for emacs-devel@gnu.org; Tue, 12 Apr 2005 12:40:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLOQp-0002JY-5p for emacs-devel@gnu.org; Tue, 12 Apr 2005 12:40:07 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DLOqR-0000bT-Lz for emacs-devel@gnu.org; Tue, 12 Apr 2005 13:06:35 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j3CH6M9N017256; Tue, 12 Apr 2005 12:06:23 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j3CH4kO15006; Tue, 12 Apr 2005 12:04:46 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier@iro.umontreal.ca In-reply-to: (message from Stefan Monnier on Mon, 11 Apr 2005 23:57:05 -0400) 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:35900 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35900 Stefan Monnier wrote: The comment about not setting the variable locally should not be added if the mode is not declared to be global. If the mode is not global, the comment is less explicit, but still says: Use the command `visible-mode' to change this variable. In the case of Visible mode, this is actually correct: just setting the variable does not work. Whether or not setting the variable works does not depend on whether the mode is global or local. The only difference is that for local modes, setting through Custom does not work. Maybe if the minor mode defined using `define-minor-mode', local or global, has an empty explicitly specified function definition, the docstring could explicitly say that setting the variable has the same effect as calling the function, except for some side stuff, like running the mode hooks. Examples include line-number-mode, column-number-mode, size-indication-mode and transient-mark-mode. I guess that there must be many others. There is the problem of reconciling stuff in `(emacs)Minor Modes' with the behavior of `define-minor-mode'. Part of that might be updating the node, but part of it might be correcting misfeatures of `define-minor-mode'. Sincerely, Luc.