changeset 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 9a6c3653f58e
children 0eccfd4850d6
files lisp/ChangeLog lisp/loadup.el
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Jan 29 20:59:21 2010 -0600
+++ b/lisp/ChangeLog	Sat Jan 30 15:47:37 2010 +0000
@@ -1,3 +1,12 @@
+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).
+
 2010-01-29  Ben Wing  <ben@xemacs.org>
 
 	* mule/cyrillic.el (for):
--- 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.