# HG changeset patch # User Richard M. Stallman # Date 781863758 0 # Node ID 5eaca32b6af623494eaae65556004371273022a0 # Parent 973eafd9f349d1a924e379164e4690082e373c57 (normal-top-level-add-to-load-path): New function. (normal-top-level): Load subdirs.el in each dir in load-path. diff -r 973eafd9f349 -r 5eaca32b6af6 lisp/startup.el --- a/lisp/startup.el Tue Oct 11 08:21:32 1994 +0000 +++ b/lisp/startup.el Tue Oct 11 08:22:38 1994 +0000 @@ -160,10 +160,25 @@ (defvar init-file-had-error nil) +;; This function is called from the subdirs.el file. +(defun normal-top-level-add-to-load-path (dirs) + (let ((tail (member default-directory load-path))) + (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail))))) + (defun normal-top-level () (if command-line-processed (message "Back to top level.") (setq command-line-processed t) + ;; Look in each dir in load-path for a subdirs.el file. + ;; If we find one, load it, which will add the appropriate subdirs + ;; of that dir into load-path, + (let ((tail load-path) + new) + (while tail + (setq new (cons (car tail) new)) + (let ((default-directory (car tail))) + (load (expand-file-name "subdirs.el" (car tail)) t t t)) + (setq tail (cdr tail)))) (if (not (eq system-type 'vax-vms)) (progn ;; If the PWD environment variable isn't accurate, delete it.