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: Sat, 30 Jul 2005 16:46:00 -0500 (CDT) Message-ID: <200507302146.j6ULk0W25424@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1122760843 21559 80.91.229.2 (30 Jul 2005 22:00:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Jul 2005 22:00:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 31 00:00:42 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DyzNY-0004Wk-B9 for ged-emacs-devel@m.gmane.org; Sun, 31 Jul 2005 00:00:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DyzQ7-0006Bj-Fn for ged-emacs-devel@m.gmane.org; Sat, 30 Jul 2005 18:03:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DyzOj-0005ie-UO for emacs-devel@gnu.org; Sat, 30 Jul 2005 18:01:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DyzOf-0005gj-UC for emacs-devel@gnu.org; Sat, 30 Jul 2005 18:01:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DyzOf-0005eH-PV for emacs-devel@gnu.org; Sat, 30 Jul 2005 18:01:33 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DyzMC-0000uO-MD for emacs-devel@gnu.org; Sat, 30 Jul 2005 17:59:00 -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 j6ULkqCK029254; Sat, 30 Jul 2005 16:46:52 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j6ULk0W25424; Sat, 30 Jul 2005 16:46:00 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: drew.adams@oracle.com In-reply-to: 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:41357 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41357 Drew Adams wrote: What about my suggestion of including this bit of code automatically, as part of the expansion of define-minor-mode - perhaps by generating an eval-after-load or something? Is that feasible? If so, would there be a problem with such a hack? That is actually exactly what the define-minor-mode code used to do, before Stefan started changing it. (Stefan kept the eval-after-load, but made it do different things). However, using eval-after-load has many negative side effects, as I pointed out before. If one wants to have define-minor-mode enable a minor mode automatically if :init-value is non-nil, then I believe that the best way to do that would be to make define-minor-mode support alternative :initialize functions like custom-initialize-set by changing the order in which define-minor-mode defines things. (As I suggested earlier.) Sincerely, Luc.