summaryrefslogtreecommitdiff
path: root/lisp/loadup.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>1999-10-13 00:21:07 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>1999-10-13 00:21:07 +0000
commitce87039d4db7d3f0abcc42d17bce0ea3c619a52e (patch)
treead7fbb38867fe80e2afcc455ec64748f080ba4d4 /lisp/loadup.el
parent1a7244d9c5d0dc6fddc90dff01ddc5fde08b26da (diff)
downloademacs-ce87039d4db7d3f0abcc42d17bce0ea3c619a52e.tar.gz
* subr.el (with-current-buffer): don't use backquotes to avoid
bootstrapping problems. loadup.el (load-path): add subdirs for bootstrapping. (docstrings): ignore errors during bootstrapping. (args): new `bootstrap' argument (for use in place of `dump').
Diffstat (limited to 'lisp/loadup.el')
-rw-r--r--lisp/loadup.el25
1 files changed, 21 insertions, 4 deletions
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 86122146a6e..ec1e2584e9a 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -28,6 +28,15 @@
;;; Code:
+;; add subdirectories to the load-path for files that might
+;; get autoloaded when bootstrapping
+(if (or (equal (nth 3 command-line-args) "bootstrap")
+ (equal (nth 4 command-line-args) "bootstrap"))
+ (let ((path (car load-path)))
+ (setq load-path (list path
+ (expand-file-name "emacs-lisp" path)
+ (expand-file-name "international" path)))))
+
(message "Using load-path %s" load-path)
;;; We don't want to have any undo records in the dumped Emacs.
@@ -39,9 +48,10 @@
;; We specify .el in case someone compiled version.el by mistake.
(load "version.el")
-(load "map-ynp")
(load "widget")
(load "custom")
+(autoload '\` "emacs-lisp/backquote" nil nil 'macro)
+(load "map-ynp")
(load "cus-start")
(load "international/mule")
(load "international/mule-conf.el") ;Don't get confused if someone compiled this by mistake.
@@ -204,7 +214,9 @@
(delete-file name))
(copy-file (expand-file-name "../etc/DOC") name t))
(Snarf-documentation (file-name-nondirectory name)))
- (Snarf-documentation "DOC"))
+ (condition-case nil
+ (Snarf-documentation "DOC")
+ (error nil)))
(message "Finding pointers to doc strings...done")
;;;Note: You can cause additional libraries to be preloaded
@@ -244,13 +256,18 @@
(setq symbol-file-load-history-loaded t))
(set-buffer-modified-p nil)
+;; reset the load-path. See lread.c:init_lread why.
+(if (or (equal (nth 3 command-line-args) "bootstrap")
+ (equal (nth 4 command-line-args) "bootstrap"))
+ (setcdr load-path nil))
+
(garbage-collect)
;;; At this point, we're ready to resume undo recording for scratch.
(buffer-enable-undo "*scratch*")
-(if (or (equal (nth 3 command-line-args) "dump")
- (equal (nth 4 command-line-args) "dump"))
+(if (or (member (nth 3 command-line-args) '("dump" "bootstrap"))
+ (member (nth 4 command-line-args) '("dump" "bootstrap")))
(if (eq system-type 'vax-vms)
(progn
(message "Dumping data as file temacs.dump")