changeset 9442:973eafd9f349

Write the subdirs.el file.
author Richard M. Stallman <rms@gnu.org>
date Tue, 11 Oct 1994 08:21:32 +0000
parents ab020bbb761f
children 5eaca32b6af6
files lisp/loadup.el
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/loadup.el	Tue Oct 11 08:05:44 1994 +0000
+++ b/lisp/loadup.el	Tue Oct 11 08:21:32 1994 +0000
@@ -110,9 +110,31 @@
     (progn		; floating pt. functions if 
       (garbage-collect)	; we have float support.
       (load "float-sup")))
+
 (garbage-collect)
 (load "vc-hooks")
 
+;; Write a file subdirs.el into the Lisp directory
+;; containing the names of the subdirs of that directory
+;; which we should check for Lisp files.
+(message "Writing subdirs.el...")
+(let ((files (directory-files "../lisp/" nil nil t))
+      (buffer-undo-list t)
+      new)
+  (while files
+    (if (and (not (member (car files) '("." ".." "term" "RCS")))
+	     (not (string-match "\\.elc?$" (car files)))
+	     (file-directory-p (expand-file-name (car files) "../lisp/")))
+	(setq new (cons (car files) new)))
+    (setq files (cdr files)))
+  (insert ";; In load-path, after this directory should come\n")
+  (insert ";; certain of its subdirectories.  Here we specify them.\n")
+  (prin1 (list 'normal-top-level-add-to-load-path
+	       (list 'quote new)) (current-buffer))
+  (write-region (point-min) (point-max)
+		(expand-file-name "subdirs.el" "../lisp/"))
+  (erase-buffer))
+
 ;; We specify .el in case someone compiled version.el by mistake.
 (load "version.el")