From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: problem of define-minor-mode while bootstrapping Date: Fri, 18 Oct 2002 17:38:46 +0900 (JST) Sender: emacs-devel-admin@gnu.org Message-ID: <200210180838.RAA08336@etlken.m17n.org> 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> <200210180700.g9I70S7P015426@santafe.santafe.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1035027224 26399 80.91.224.249 (19 Oct 2002 11:33:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 19 Oct 2002 11:33:44 +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 182rrS-0006re-00 for ; Sat, 19 Oct 2002 13:33:42 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 182skK-0002oH-00 for ; Sat, 19 Oct 2002 14:30:24 +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 182rq2-00075T-00; Sat, 19 Oct 2002 07:32:14 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 182rpd-0006wl-00 for emacs-devel@gnu.org; Sat, 19 Oct 2002 07:31:49 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 182rpa-0006wD-00 for emacs-devel@gnu.org; Sat, 19 Oct 2002 07:31:49 -0400 Original-Received: from gnudist.gnu.org ([199.232.41.7]) by monty-python.gnu.org with esmtp (Exim 4.10) id 182a0U-0001ta-01; Fri, 18 Oct 2002 12:29:50 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by gnudist.gnu.org with esmtp (Exim 4.10) id 182SnX-0007Yo-00; Fri, 18 Oct 2002 04:48:00 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6/3.7W-20010518204228) with ESMTP id g9I8ckk20305; Fri, 18 Oct 2002 17:38:46 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.3/3.7W-20010823150639) with ESMTP id g9I8ckR10213; Fri, 18 Oct 2002 17:38:46 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id RAA08336; Fri, 18 Oct 2002 17:38:46 +0900 (JST) Original-To: rms@gnu.org In-reply-to: <200210180700.g9I70S7P015426@santafe.santafe.edu> (message from Richard Stallman on Fri, 18 Oct 2002 01:00:28 -0600 (MDT)) 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:8585 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8585 In article <200210180700.g9I70S7P015426@santafe.santafe.edu>, Richard Stallman writes: > 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. Oops, perhaps the code I quoted was from easy-mmode.el of the version 1.42 of HEAD. Sorry for the confusion. > Should I add it? No, I don't think so. > 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? With this change, at least, setting :init-value to t doesn't cause a trouble at bootstrapping time. We still should have the code to turn that minor mode on explicitely as below: (define-minor-mode XXX-mode "..." :init-value t ...) (XXX-mode 1) But, I think that is ok because that is necessary only for a preloaded file. --- Ken'ichi HANDA handa@m17n.org