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: [drew.adams@oracle.com: Info on define-minor-mode - :init-valueor :initial-value?] Date: Fri, 29 Jul 2005 23:22:44 -0500 (CDT) Message-ID: <200507300422.j6U4MiB22285@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1122697880 11995 80.91.229.2 (30 Jul 2005 04:31:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Jul 2005 04:31:20 +0000 (UTC) Cc: drew.adams@oracle.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 30 06:31:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dyj04-0000HA-Qo for ged-emacs-devel@m.gmane.org; Sat, 30 Jul 2005 06:31:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dyj2b-0003py-3c for ged-emacs-devel@m.gmane.org; Sat, 30 Jul 2005 00:33:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dyj1R-0003X6-Oj for emacs-devel@gnu.org; Sat, 30 Jul 2005 00:32:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dyj1G-0003R5-RE for emacs-devel@gnu.org; Sat, 30 Jul 2005 00:32:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dyj1E-0003PC-Ob for emacs-devel@gnu.org; Sat, 30 Jul 2005 00:32:16 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dyj4K-0000PU-2R for emacs-devel@gnu.org; Sat, 30 Jul 2005 00:35:28 -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 j6U4NTCK027454; Fri, 29 Jul 2005 23:23:29 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j6U4MiB22285; Fri, 29 Jul 2005 23:22:44 -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 Fri, 29 Jul 2005 11:59:38 -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:41330 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41330 Stefan Monnier wrote: > Otherwise, if we're going to be rigid about this guideline (perhaps there > are good reasons to do that, even in this case), then maybe we should just > get rid of :init-value and have the initial value always be nil - that is, > make users of a library turn on the minor mode explicitly. That would not be > my preference, but it would at least avoid confusion. That might be a good alternative. No, because sometimes a standard value of t is appropriate and the :init-value _has_ to reflect the standard value, or Custom would consider the variable to be "rogue". What if I just document in the Elisp manual what the acceptable situations are for a non-nil :init-value and how it needs to be handled: pre-load the file containing the define-minor-mode before startup.el and call the minor mode function (or custom-reevaluate-setting if the minor mode only has to be enabled conditionally) in startup.el for minor modes included with the Emacs distribution that affect Emacs "globally" and put (if foo-mode (foo-mode 1)) at the end of the file containing the define-minor-mode for minor modes that only affect features defined in that file (and that are in files that are not pre-loaded). Sincerely, Luc.