diff lisp/loadup.el @ 4899:aa8197436fdb

Make #'find-function behave better with dumped functions, installed XEmacs 2010-01-30 Aidan Kehoe <kehoea@parhasard.net> * loadup.el: If any filename in load-history starts with the value of source-lisp, delete that part of the string, so that #'find-function works better with dumped functions in an installed XEmacs (it will look in lisp-directory instead, where it will probably succeed).
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 30 Jan 2010 15:47:37 +0000
parents 3465c3161fea
children bedf3747a6d7
line wrap: on
line diff
--- a/lisp/loadup.el	Fri Jan 29 20:59:21 2010 -0600
+++ b/lisp/loadup.el	Sat Jan 30 15:47:37 2010 +0000
@@ -227,6 +227,12 @@
 ;; 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.