changeset 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 1628e3b9601a
children c914214b788d 9c6ea1581159
files lisp/ChangeLog lisp/loadhist.el lisp/loadup.el
diffstat 3 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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@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@parhasard.net>
 
 	* cl-macs.el (equalp):
--- 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)
--- 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,8 +218,12 @@
 ;; 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.
@@ -227,12 +231,6 @@
 ;; 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)
 
 ;;; At this point, we're ready to resume undo recording for scratch.