From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: problem of define-minor-mode while bootstrapping Date: Fri, 18 Oct 2002 01:00:28 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200210180700.g9I70S7P015426@santafe.santafe.edu> References: <200209191320.WAA03733@etlken.m17n.org> <200209191346.g8JDkdq07175@rum.cs.yale.edu> <200209200006.JAA04300@etlken.m17n.org> <200209201838.g8KIc8t13414@rum.cs.yale.edu> <20020921020041.GA1545@gnu.org> <200209300626.PAA04899@etlken.m17n.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1035009167 19585 80.91.224.249 (19 Oct 2002 06:32:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 19 Oct 2002 06:32:47 +0000 (UTC) Cc: d.love@dl.ac.uk, miles@gnu.org, monnier+gnu/emacs@rum.cs.yale.edu, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 182nAD-00055k-00 for ; Sat, 19 Oct 2002 08:32:45 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 182o30-0003sS-00 for ; Sat, 19 Oct 2002 09:29:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 182n8k-0008C5-00; Sat, 19 Oct 2002 02:31:14 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 182n7s-000844-00 for emacs-devel@gnu.org; Sat, 19 Oct 2002 02:30:20 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 182n7q-00083R-00 for emacs-devel@gnu.org; Sat, 19 Oct 2002 02:30:19 -0400 Original-Received: from gnudist.gnu.org ([199.232.41.7]) by monty-python.gnu.org with esmtp (Exim 4.10) id 182a4c-0001ta-01; Fri, 18 Oct 2002 12:34:06 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by gnudist.gnu.org with esmtp (Exim 4.10) id 182RlC-0006Fr-00; Fri, 18 Oct 2002 03:41:30 -0400 Original-Received: from santafe.santafe.edu (santafe [192.12.12.2]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g9I70c816723; Fri, 18 Oct 2002 01:00:38 -0600 (MDT) Original-Received: from santafe.santafe.edu (localhost [127.0.0.1]) by santafe.santafe.edu (8.12.2+Sun/8.12.5) with ESMTP id g9I70TKK015435; Fri, 18 Oct 2002 01:00:29 -0600 (MDT) Original-Received: (from rms@localhost) by santafe.santafe.edu (8.12.2+Sun/8.12.2/Submit) id g9I70S7P015426; Fri, 18 Oct 2002 01:00:28 -0600 (MDT) Original-To: handa@m17n.org In-reply-to: <200209300626.PAA04899@etlken.m17n.org> (message from Kenichi Handa on Mon, 30 Sep 2002 15:26:02 +0900 (JST)) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8578 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8578 In RC, if both :global and :init-value of define-minor-mode is non-nil, define-minor-mode calls eval-after-load as below: ;; If the mode is global, call the function according to the default. ,(if (and globalp (null init-value)) `(if (and load-file-name ,mode) (eval-after-load load-file-name '(,mode 1))))))) And, eval-after-load calls load-symbol-file-load-history, and load-symbol-file-load-history loads "fns-XX.YY.ZZ.el". But, at bootstrapping time, as "fns-XX.YY.ZZ.el" is not yet generated, it signals an error. I looked at RC and found this code: ;; If the mode is global, call the function according to the default. ,(if globalp `(if (and load-file-name ,mode) (eval-after-load load-file-name '(,mode 1))))))) As far as I can tell, the (null init-value) was never there. Should I add it? Anyway, I think the bug you found can be fixed this way: ;; If the mode is global, call the function according to the default. ,(if globalp `(if (and load-file-name ,mode (not purify-flag)) (eval-after-load load-file-name '(,mode 1))))))) Does that fix work?