comparison lisp/loadup.el @ 4922:8934492a0e97

merge
author Ben Wing <ben@xemacs.org>
date Wed, 03 Feb 2010 08:03:15 -0600
parents bedf3747a6d7
children 39d74978fd32
comparison
equal deleted inserted replaced
4921:17362f371cc2 4922:8934492a0e97
216 ;; Note: You can cause additional libraries to be preloaded 216 ;; Note: You can cause additional libraries to be preloaded
217 ;; by writing a site-init.el that loads them. 217 ;; by writing a site-init.el that loads them.
218 ;; See also "site-load" above. 218 ;; See also "site-load" above.
219 (when (stringp site-start-file) 219 (when (stringp site-start-file)
220 (load "site-init" t)) 220 (load "site-init" t))
221 ;; Add information from this file to the load history: 221
222 (setq load-history (cons (nreverse current-load-list) load-history) 222 ;; Add information from this file to the load history. Delete information
223 ;; for those files in preloaded-file-list; the symbol file information can
224 ;; be taken from DOC, and #'unload-feature makes very little sense for
225 ;; dumped functionality.
226 (setq load-history (cons (nreverse current-load-list) (last load-history))
223 ;; Clear current-load-list; this (and adding information to 227 ;; Clear current-load-list; this (and adding information to
224 ;; load-history) is normally done in lread.c after reading the 228 ;; load-history) is normally done in lread.c after reading the
225 ;; entirety of a file, something which never happens for loadup.el. 229 ;; entirety of a file, something which never happens for loadup.el.
226 current-load-list nil) 230 current-load-list nil)
227 ;; Make the path to this file look a little nicer: 231 ;; Make the path to this file look a little nicer:
228 (setcar (car load-history) (file-truename (caar load-history))) 232 (setcar (car load-history) (file-truename (caar load-history)))
229
230 ;; Make #'find-function behave better with dumped files.
231 (let ((source-lisp (concat "^" (regexp-quote source-lisp))))
232 (mapc
233 #'(lambda (elt) (setcar elt (replace-in-string (car elt) source-lisp "")))
234 load-history))
235 233
236 (garbage-collect) 234 (garbage-collect)
237 235
238 ;;; At this point, we're ready to resume undo recording for scratch. 236 ;;; At this point, we're ready to resume undo recording for scratch.
239 (buffer-enable-undo "*scratch*") 237 (buffer-enable-undo "*scratch*")