changeset 26002:4f46db3c9d7d

* 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').
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 13 Oct 1999 00:21:07 +0000
parents f2418e8499aa
children f6c190ef2f45
files lisp/ChangeLog lisp/loadup.el lisp/subr.el
diffstat 3 files changed, 32 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Oct 12 22:19:26 1999 +0000
+++ b/lisp/ChangeLog	Wed Oct 13 00:21:07 1999 +0000
@@ -1,3 +1,11 @@
+1999-10-12  Stefan Monnier  <monnier@cs.yale.edu>
+
+	* 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').
+
 1999-10-12  Emmanuel Briot  <briot@gnat.com>
 
 	* ada-stmt.el: Doc-string fixes.
--- a/lisp/loadup.el	Tue Oct 12 22:19:26 1999 +0000
+++ b/lisp/loadup.el	Wed Oct 13 00:21:07 1999 +0000
@@ -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")
--- a/lisp/subr.el	Tue Oct 12 22:19:26 1999 +0000
+++ b/lisp/subr.el	Wed Oct 13 00:21:07 1999 +0000
@@ -977,9 +977,9 @@
   "Execute the forms in BODY with BUFFER as the current buffer.
 The value returned is the value of the last form in BODY.
 See also `with-temp-buffer'."
-  `(save-current-buffer
-    (set-buffer ,buffer)
-    ,@body))
+  (cons 'save-current-buffer
+	(cons (list 'set-buffer buffer)
+	      body)))
 
 (defmacro with-temp-file (file &rest body)
   "Create a new buffer, evaluate BODY there, and write the buffer to FILE.