From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: some subdirs.el won't be loaded Date: Tue, 24 May 2005 10:51:51 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1116946638 5623 80.91.229.2 (24 May 2005 14:57:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 May 2005 14:57:18 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 24 16:57:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Daaml-0003s3-5A for ged-emacs-devel@m.gmane.org; Tue, 24 May 2005 16:53:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DaaqR-00010E-2J for ged-emacs-devel@m.gmane.org; Tue, 24 May 2005 10:57:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Daapg-0000SL-00 for emacs-devel@gnu.org; Tue, 24 May 2005 10:56:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Daapb-0000Oi-6v for emacs-devel@gnu.org; Tue, 24 May 2005 10:56:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DaapZ-0000M4-TE for emacs-devel@gnu.org; Tue, 24 May 2005 10:56:30 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DaalN-0002DD-6v for emacs-devel@gnu.org; Tue, 24 May 2005 10:52:09 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 9AEBB2CF50E; Tue, 24 May 2005 10:51:56 -0400 (EDT) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 333164AC008; Tue, 24 May 2005 10:51:52 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id EF869E6C16; Tue, 24 May 2005 10:51:51 -0400 (EDT) Original-To: Kenichi Handa In-Reply-To: (Kenichi Handa's message of "Tue, 24 May 2005 22:14:31 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.84, requis 5, autolearn=not spam, AWL 0.06, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca 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:37570 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37570 > I found that some subdirs.el won't be loaded. It seems that > the reason is this change. > 2004-08-20 Stefan Monnier > * startup.el (normal-top-level-add-subdirs-to-load-path): > Avoid unnecessarily checking system-type. > (normal-top-level): Set TERM to "dumb". Simplify. > ^^^^^^^^ > 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? Stefan --- 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")))