Mercurial > hg > xemacs-beta
comparison lisp/loadup.el @ 4915:bedf3747a6d7
Use DOC for dumped Lisp file names; Xref to source-lisp if readable, symbol-file
lisp/ChangeLog addition:
2010-02-01 Aidan Kehoe <kehoea@parhasard.net>
* loadhist.el (symbol-file):
If #'built-in-symbol-file returns a Lisp file name, and
source-lisp is readable, construct a full pathname to include
that. Otherwise use lisp-directory, as we used to.
* loadup.el:
Delete load-history entries for those files in
preloaded-file-list; unloading the associated features makes very
little sense, and the symbol file information can be had from DOC.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 03 Feb 2010 00:20:08 +0000 |
parents | aa8197436fdb |
children | 39d74978fd32 |
comparison
equal
deleted
inserted
replaced
4914:1628e3b9601a | 4915:bedf3747a6d7 |
---|---|
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*") |