[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: some subdirs.el won't be loaded
From: |
Stefan Monnier |
Subject: |
Re: some subdirs.el won't be loaded |
Date: |
Tue, 24 May 2005 10:51:51 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> I found that some subdirs.el won't be loaded. It seems that
> the reason is this change.
> 2004-08-20 Stefan Monnier <address@hidden>
> * 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")))