commit: Use DOC for dumped Lisp file names; Xref to source-lisp if readable, symbol-file
Aidan Kehoe
kehoea at parhasard.net
Tue Feb 2 19:20:44 EST 2010
changeset: 4915:bedf3747a6d7
tag: tip
user: Aidan Kehoe <kehoea at parhasard.net>
date: Wed Feb 03 00:20:08 2010 +0000
files: lisp/ChangeLog lisp/loadhist.el lisp/loadup.el
description:
Use DOC for dumped Lisp file names; Xref to source-lisp if readable, symbol-file
lisp/ChangeLog addition:
2010-02-01 Aidan Kehoe <kehoea at 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.
diff -r 1628e3b9601a -r bedf3747a6d7 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Feb 02 15:19:15 2010 -0600
+++ b/lisp/ChangeLog Wed Feb 03 00:20:08 2010 +0000
@@ -1,3 +1,14 @@
+2010-02-01 Aidan Kehoe <kehoea at 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.
+
2010-02-01 Aidan Kehoe <kehoea at parhasard.net>
* cl-macs.el (equalp):
diff -r 1628e3b9601a -r bedf3747a6d7 lisp/loadhist.el
--- a/lisp/loadhist.el Tue Feb 02 15:19:15 2010 -0600
+++ b/lisp/loadhist.el Wed Feb 03 00:20:08 2010 +0000
@@ -90,7 +90,10 @@
;; This is a bit heuristic, but shouldn't realistically be a
;; problem:
(if (string-match "\.elc?$" built-in-file)
- (concat lisp-directory built-in-file)
+ (concat (if (file-readable-p source-lisp)
+ source-lisp
+ lisp-directory)
+ built-in-file)
(concat source-directory "/src/" built-in-file))))))
(defun feature-symbols (feature)
diff -r 1628e3b9601a -r bedf3747a6d7 lisp/loadup.el
--- a/lisp/loadup.el Tue Feb 02 15:19:15 2010 -0600
+++ b/lisp/loadup.el Wed Feb 03 00:20:08 2010 +0000
@@ -218,20 +218,18 @@
;; See also "site-load" above.
(when (stringp site-start-file)
(load "site-init" t))
-;; Add information from this file to the load history:
-(setq load-history (cons (nreverse current-load-list) load-history)
+
+;; Add information from this file to the load history. Delete information
+;; for those files in preloaded-file-list; the symbol file information can
+;; be taken from DOC, and #'unload-feature makes very little sense for
+;; dumped functionality.
+(setq load-history (cons (nreverse current-load-list) (last load-history))
;; Clear current-load-list; this (and adding information to
;; load-history) is normally done in lread.c after reading the
;; entirety of a file, something which never happens for loadup.el.
current-load-list nil)
;; Make the path to this file look a little nicer:
(setcar (car load-history) (file-truename (caar load-history)))
-
-;; Make #'find-function behave better with dumped files.
-(let ((source-lisp (concat "^" (regexp-quote source-lisp))))
- (mapc
- #'(lambda (elt) (setcar elt (replace-in-string (car elt) source-lisp "")))
- load-history))
(garbage-collect)
More information about the XEmacs-Patches
mailing list