Subject: bug#4473: after-load-functions: files are not absolute, some are missed

From: Juanma Barranquero <[email-masked]>
Date: Fri, 18 Sep 2009 02:11:50 +0200

On Fri, Sep 18, 2009 at 01:02, Glenn Morris <[email-masked]> wrote:
>
> 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:

BTW, doesn't the patch below work for you? On my Emacs, this results in

("tooltip.elc" "ediff-hook.elc" "vc-hooks.elc"
"emacs-lisp/float-sup.elc" "mwheel.elc" "w32-fns.elc" "dos-w32.elc"
"disp-table.elc" "ls-lisp.elc" "term/w32-win.elc"
"term/common-win.elc" "w32-vars.elc" "tool-bar.elc" "dnd.elc"
"international/fontset.elc" "image.elc" "fringe.elc" "buff-menu.elc"
"replace.elc" "textmodes/fill.elc" "textmodes/text-mode.elc"
"emacs-lisp/lisp-mode.elc" "textmodes/paragraphs.elc" "register.elc"
"textmodes/page.elc" "emacs-lisp/lisp.elc" "paths.el" "menu-bar.elc"
"rfn-eshadow.elc" "isearch.elc" "emacs-lisp/timer.elc" "select.elc"
"scroll-bar.elc" "mouse.elc" "jit-lock.elc" "font-lock.elc"
"emacs-lisp/syntax.elc" "facemenu.elc" "font-core.elc"
"term/tty-colors.elc" "frame.elc" "window.elc" "indent.elc"
"language/cham.el" "language/burmese.el" "language/khmer.el"
"language/georgian.el" "language/utf-8-lang.el"
"language/misc-lang.el" "language/vietnamese.elc"
"language/tibetan.elc" "language/thai.el" "language/tai-viet.el"
"language/lao.el" "language/korean.el" "language/japanese.el"
"international/eucjp-ms.el" "international/cp51932.el"
"language/hebrew.el" "language/greek.el" "language/romanian.el"
"language/slovak.el" "language/czech.el" "language/european.elc"
"language/ethiopic.elc" "language/english.el" "language/sinhala.el"
"language/indian.elc" "language/cyrillic.elc" "language/chinese.elc"
"international/charprop.el" "composite.elc"
"international/characters.elc" "case-table.elc"
"international/mule-cmds.elc" "epa-hook.elc" "jka-cmpr-hook.elc"
"help.elc" "simple.elc" "abbrev.elc" "loaddefs.el" "startup.elc"
"button.elc" "minibuffer.elc" "faces.elc" "cus-face.elc" "files.elc"
"bindings.elc" "format.elc" "env.elc" "international/mule-conf.el"
"international/mule.elc" "cus-start.elc" "emacs-lisp/map-ynp.elc"
"custom.elc" "widget.elc" "version.el" "subr.elc"
"emacs-lisp/backquote.elc" "emacs-lisp/byte-run.elc")

which seems about right.

    Juanma

Index: lisp/loadup.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/loadup.el,v
retrieving revision 1.184
diff -u -2 -r1.184 loadup.el
--- lisp/loadup.el	15 Sep 2009 03:46:08 -0000	1.184
+++ lisp/loadup.el	18 Sep 2009 00:06:20 -0000
@@ -65,4 +65,7 @@
 (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.")
+
 ;; We specify .el in case someone compiled version.el by mistake.
 (load "version.el")
@@ -319,4 +322,7 @@
     (setcdr load-path nil))

+(or dumped-lisp-files
+    (setq dumped-lisp-files (mapcar 'car load-history)))
+
 (remove-hook 'after-load-functions '(lambda (f) (garbage-collect)))