diff lisp/loadup.el @ 243:f220cc83d72e r20-5b20

Import from CVS: tag r20-5b20
author cvs
date Mon, 13 Aug 2007 10:17:07 +0200
parents 85a06df23a9a
children e70b3a057e12
line wrap: on
line diff
--- a/lisp/loadup.el	Mon Aug 13 10:16:17 2007 +0200
+++ b/lisp/loadup.el	Mon Aug 13 10:17:07 2007 +0200
@@ -88,22 +88,29 @@
 	;; minimize the size of the dumped image (if we don't do this,
 	;; there will be lots of extra space in the data segment filled
 	;; with garbage-collected junk)
-	(defmacro load-gc (file)
-	  (list 'prog1
-		(list 'load
-		      (list 'locate-file file
-			    'load-path
-			    (list 'if 'load-ignore-elc-files
-				  ".el:"
-				  ".elc:.el:")))
-		;; '(test-atoms)
-		'(garbage-collect)))
+	(defun load-gc (file)
+	  (let ((full-path (locate-file file
+					load-path
+					(if load-ignore-elc-files
+					    ".el:"
+					  ".elc:.el:"))))
+	    (if full-path
+		(prog1
+		  (load full-path)
+		  ;; '(test-atoms)
+		  '(garbage-collect))
+	      (external-debugging-output (format "\nLoad file %s: not found\n"
+						 file))
+	      nil)))
 
 	(load (concat default-directory "../lisp/dumped-lisp.el"))
 	(let ((dumped-lisp-packages preloaded-file-list)
 	      file)
 	  (while (setq file (car dumped-lisp-packages))
-	    (load-gc file)
+	    (or (load-gc file)
+	      (progn
+		(external-debugging-output "Fatal error during load, aborting")
+		(kill-emacs 1)))
 	    (setq dumped-lisp-packages (cdr dumped-lisp-packages)))
 	  (if (not (featurep 'toolbar))
 	      (progn