aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-11 08:22:38 +0000
committerRichard M. Stallman1994-10-11 08:22:38 +0000
commite87a730999bf986dae66de6c4ac020efc40dd57d (patch)
tree48218a73e99b59e2ce167029e5d065caed2616af
parente4636528820a1c44a287199b85683aeb7d1871e6 (diff)
downloademacs-e87a730999bf986dae66de6c4ac020efc40dd57d.tar.gz
emacs-e87a730999bf986dae66de6c4ac020efc40dd57d.zip
(normal-top-level-add-to-load-path): New function.
(normal-top-level): Load subdirs.el in each dir in load-path.
-rw-r--r--lisp/startup.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index e71792f724f..081b3aed126 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -160,10 +160,25 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
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.