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-value or :initial-value?] Date: Wed, 27 Jul 2005 11:04:25 -0500 (CDT) Message-ID: <200507271604.j6RG4Pf04580@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1122481077 27423 80.91.229.2 (27 Jul 2005 16:17:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2005 16:17:57 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 27 18:17:52 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dxoaf-000826-7h for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2005 18:17:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dxod0-0002iE-9P for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2005 12:19:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dxoaj-0001p3-6Z for emacs-devel@gnu.org; Wed, 27 Jul 2005 12:17:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dxoai-0001oE-69 for emacs-devel@gnu.org; Wed, 27 Jul 2005 12:17:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DxoYr-0001A3-Jv for emacs-devel@gnu.org; Wed, 27 Jul 2005 12:15:13 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DxoaC-0005t9-6n; Wed, 27 Jul 2005 12:16:36 -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 j6RG57CK019222; Wed, 27 Jul 2005 11:05:07 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j6RG4Pf04580; Wed, 27 Jul 2005 11:04:25 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (rms@gnu.org) 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:41247 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41247 Richard Stallman wrote: Would someone please DTRT and then respond? For the moment, I just replaced the incorrect keyword :initial-value in the example with :init-value. However, probably somewhat more extensive changes are needed. The example (now) does: :init-value nil But this is redundant, as the default :init-value is nil anyway. So it probably just should be deleted. There is more. You can not specify a non-nil :init-value, unless either the minor mode is enabled by just setting the variable or unless you do something extra. That something extra is to preload the file containing the define-minor-mode before startup.el and then using `custom-reevaluate-setting in startup.el (for files included with the Emacs distribution) or to call the minor mode function near the end of the file (for files not included with the Emacs distribution). We could either document these requirements in the Elisp manual and the define-minor-mode docstring or change define-minor-mode so that these requirements are no longer necessary. The latter requires changes which Stefan probably would not like. For instance it would mean that the call to `define-minor-mode' would need to be delayed until after all functions used by the minor mode function have been defined (but only for define-minor-mode's with a non-nil :init-value). Sincerely, Luc.