From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: some subdirs.el won't be loaded Date: Wed, 25 May 2005 09:49:26 +0900 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1116982448 29189 80.91.229.2 (25 May 2005 00:54:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 May 2005 00:54:08 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 25 02:53:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dak9H-0005vD-Mw for ged-emacs-devel@m.gmane.org; Wed, 25 May 2005 02:53:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DakD2-0000ic-UV for ged-emacs-devel@m.gmane.org; Tue, 24 May 2005 20:57:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DakB7-0000Sr-TP for emacs-devel@gnu.org; Tue, 24 May 2005 20:55:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DakAs-0000IY-LV for emacs-devel@gnu.org; Tue, 24 May 2005 20:55:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DakAr-0008WC-4O for emacs-devel@gnu.org; Tue, 24 May 2005 20:55:05 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1Dak92-0008RS-AK for emacs-devel@gnu.org; Tue, 24 May 2005 20:53:12 -0400 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j4P0qp86030105; Wed, 25 May 2005 09:52:51 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j4P0qoCq014178; Wed, 25 May 2005 09:52:50 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1Dak5O-0002B1-00; Wed, 25 May 2005 09:49:26 +0900 Original-To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Tue, 24 May 2005 10:51:51 -0400) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) 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:37589 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37589 In article , Stefan Monnier writes: >> normal-top-level-add-to-load-path appends directories to >> load-path destructively, but because of above change, >> subdirs.el in those newly added directories are not loaded. > Aaaahhh indeed. > Would the patch below fix things? Yes. Thank you! --- Kenichi Handa handa@m17n.org > --- startup.el 19 mai 2005 11:05:48 -0400 1.357 > +++ startup.el 24 mai 2005 10:51:21 -0400 > @@ -368,11 +368,17 @@ > ;; of that dir into load-path, > ;; Look for a leim-list.el file too. Loading it will register > ;; available input methods. > - (dolist (dir load-path) > + (let ((tail load-path) dir) > + (while tail > + (setq dir (car tail)) > (let ((default-directory dir)) > (load (expand-file-name "subdirs.el") t t t)) > (let ((default-directory dir)) > - (load (expand-file-name "leim-list.el") t t t))) > + (load (expand-file-name "leim-list.el") t t t)) > + ;; We don't use a dolist loop and we put this "setq-cdr" command at > + ;; the end, because the subdirs.el files may add elements to the end > + ;; of load-path and we want to take it into account. > + (setq tail (cdr tail)))) > (unless (eq system-type 'vax-vms) > ;; If the PWD environment variable isn't accurate, delete it. > (let ((pwd (getenv "PWD"))) > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel