In the current CVS trunk, I found myself having a (slight) need for a
list of the dumped lisp files. I thought a simple patch like the
following would work, but it has some problems:
i) the file names stored are not absolute, though the doc of
after-load-functions says they should be. (It's actually better in
this case that they are non-absolute, but it conflicts with the doc.)
ii) some files are missing. It turns out it is the non-compiled ones
loaded after the setting of load-source-file-function. If this is
non-nil, looks like Fload returns before running `after-load-functions'?
*** loadup.el 15 Sep 2009 03:46:08 -0000 1.184
--- loadup.el 17 Sep 2009 22:57:00 -0000
*** 64,69 ****
--- 64,79 ----
;; implemented in subr.el.
(add-hook 'after-load-functions '(lambda (f) (garbage-collect)))
+ (defvar dumped-lisp-files nil
+ "List of Lisp files dumped with (i.e., compiled into) this Emacs.")
+ (or dumped-lisp-files
+ (setq dumped-lisp-files '("subr" "emacs-lisp/backquote"
+ (add-hook 'after-load-functions
+ '(lambda (f) (add-to-list 'dumped-lisp-files f)))))
;; We specify .el in case someone compiled version.el by mistake.
*** 318,323 ****
--- 328,335 ----
(equal (nth 4 command-line-args) "bootstrap"))
(setcdr load-path nil))
+ (remove-hook 'after-load-functions
+ '(lambda (f) (add-to-list 'dumped-lisp-files f)))
(remove-hook 'after-load-functions '(lambda (f) (garbage-collect)))
(setq inhibit-load-charset-map nil)