comparison lisp/startup.el @ 9443:5eaca32b6af6

(normal-top-level-add-to-load-path): New function. (normal-top-level): Load subdirs.el in each dir in load-path.
author Richard M. Stallman <rms@gnu.org>
date Tue, 11 Oct 1994 08:22:38 +0000
parents c4ccb2502ebf
children 7641fc43ca94
comparison
equal deleted inserted replaced
9442:973eafd9f349 9443:5eaca32b6af6
158 158
159 (defvar init-file-debug nil) 159 (defvar init-file-debug nil)
160 160
161 (defvar init-file-had-error nil) 161 (defvar init-file-had-error nil)
162 162
163 ;; This function is called from the subdirs.el file.
164 (defun normal-top-level-add-to-load-path (dirs)
165 (let ((tail (member default-directory load-path)))
166 (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail)))))
167
163 (defun normal-top-level () 168 (defun normal-top-level ()
164 (if command-line-processed 169 (if command-line-processed
165 (message "Back to top level.") 170 (message "Back to top level.")
166 (setq command-line-processed t) 171 (setq command-line-processed t)
172 ;; Look in each dir in load-path for a subdirs.el file.
173 ;; If we find one, load it, which will add the appropriate subdirs
174 ;; of that dir into load-path,
175 (let ((tail load-path)
176 new)
177 (while tail
178 (setq new (cons (car tail) new))
179 (let ((default-directory (car tail)))
180 (load (expand-file-name "subdirs.el" (car tail)) t t t))
181 (setq tail (cdr tail))))
167 (if (not (eq system-type 'vax-vms)) 182 (if (not (eq system-type 'vax-vms))
168 (progn 183 (progn
169 ;; If the PWD environment variable isn't accurate, delete it. 184 ;; If the PWD environment variable isn't accurate, delete it.
170 (let ((pwd (getenv "PWD"))) 185 (let ((pwd (getenv "PWD")))
171 (and (stringp pwd) 186 (and (stringp pwd)