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, 20 Sep 2002 09:06:58 +0900 (JST) Sender: emacs-devel-admin@gnu.org Message-ID: <200209200006.JAA04300@etlken.m17n.org> References: <200209191320.WAA03733@etlken.m17n.org> <200209191346.g8JDkdq07175@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1032480537 11089 127.0.0.1 (20 Sep 2002 00:08:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 20 Sep 2002 00:08:57 +0000 (UTC) Cc: emacs-devel@gnu.org, d.love@dl.ac.uk Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17sBLr-0002sh-00 for ; Fri, 20 Sep 2002 02:08:55 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17sC0s-0002tw-00 for ; Fri, 20 Sep 2002 02:51:18 +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 17sBMB-0007L0-00; Thu, 19 Sep 2002 20:09:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17sBKE-0007Ev-00 for emacs-devel@gnu.org; Thu, 19 Sep 2002 20:07:14 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17sBKC-0007Eh-00 for emacs-devel@gnu.org; Thu, 19 Sep 2002 20:07:14 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17sBKC-0007EW-00 for emacs-devel@gnu.org; Thu, 19 Sep 2002 20:07:12 -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 g8K06xK23072; Fri, 20 Sep 2002 09:06:59 +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 g8K06wd03631; Fri, 20 Sep 2002 09:06:58 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id JAA04300; Fri, 20 Sep 2002 09:06:58 +0900 (JST) Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-reply-to: <200209191346.g8JDkdq07175@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) 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:8028 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8028 In article <200209191346.g8JDkdq07175@rum.cs.yale.edu>, "Stefan Monnier" writes: >> Here's the last few lines of define-minor-mode. >> >> ;; 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))))))) >> >> Could someone please fix this problem at first? > Update your sandbox, I've fixed it a few days ago AFAIK, Do you mean this change? * emacs-lisp/easy-mmode.el (define-minor-mode): Add a :require arg. Don't call the function during init if mode is on by default. *************** *** 224,230 **** (symbol-value ',keymap-sym)))) ;; 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))))))) --- 227,233 ---- (symbol-value ',keymap-sym)))) ;; 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))))))) Could you please install it in RC too if that causes no problem? But, it seems that, with this, if :init-value is t, the function to do various settings to make the mode work is never called. --- Ken'ichi HANDA handa@etl.go.jp