Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
242:fc816b73a05f | 243:f220cc83d72e |
---|---|
86 | 86 |
87 ;; garbage collect after loading every file in an attempt to | 87 ;; garbage collect after loading every file in an attempt to |
88 ;; minimize the size of the dumped image (if we don't do this, | 88 ;; minimize the size of the dumped image (if we don't do this, |
89 ;; there will be lots of extra space in the data segment filled | 89 ;; there will be lots of extra space in the data segment filled |
90 ;; with garbage-collected junk) | 90 ;; with garbage-collected junk) |
91 (defmacro load-gc (file) | 91 (defun load-gc (file) |
92 (list 'prog1 | 92 (let ((full-path (locate-file file |
93 (list 'load | 93 load-path |
94 (list 'locate-file file | 94 (if load-ignore-elc-files |
95 'load-path | 95 ".el:" |
96 (list 'if 'load-ignore-elc-files | 96 ".elc:.el:")))) |
97 ".el:" | 97 (if full-path |
98 ".elc:.el:"))) | 98 (prog1 |
99 ;; '(test-atoms) | 99 (load full-path) |
100 '(garbage-collect))) | 100 ;; '(test-atoms) |
101 '(garbage-collect)) | |
102 (external-debugging-output (format "\nLoad file %s: not found\n" | |
103 file)) | |
104 nil))) | |
101 | 105 |
102 (load (concat default-directory "../lisp/dumped-lisp.el")) | 106 (load (concat default-directory "../lisp/dumped-lisp.el")) |
103 (let ((dumped-lisp-packages preloaded-file-list) | 107 (let ((dumped-lisp-packages preloaded-file-list) |
104 file) | 108 file) |
105 (while (setq file (car dumped-lisp-packages)) | 109 (while (setq file (car dumped-lisp-packages)) |
106 (load-gc file) | 110 (or (load-gc file) |
111 (progn | |
112 (external-debugging-output "Fatal error during load, aborting") | |
113 (kill-emacs 1))) | |
107 (setq dumped-lisp-packages (cdr dumped-lisp-packages))) | 114 (setq dumped-lisp-packages (cdr dumped-lisp-packages))) |
108 (if (not (featurep 'toolbar)) | 115 (if (not (featurep 'toolbar)) |
109 (progn | 116 (progn |
110 ;; else still define a few functions. | 117 ;; else still define a few functions. |
111 (defun toolbar-button-p (obj) "No toolbar support." nil) | 118 (defun toolbar-button-p (obj) "No toolbar support." nil) |