GNU bug report logs -
#4473
after-load-functions: files are not absolute, some are missed
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Thu, 17 Sep 2009 23:10:15 UTC
Severity: normal
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:
#4473: after-load-functions: files are not absolute, some are missed
It has been closed by Glenn Morris <rgm <at> gnu.org>.
Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Glenn Morris <rgm <at> gnu.org> by
replying to this email.
--
4473: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4473
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Juanma Barranquero wrote:
> During preloading, the file name recorded is relative to the main Lisp
> directory. These file names are converted to absolute at startup.
>
> So perhaps the docstring of `after-load-functions' should be fixed to
> note this discrepancy.
Bah, it's a fairly obscure use case, that turns out not to even be
necessary in this case. So probably not worth mentioning.
Thanks for setting me straight.
[Message part 3 (message/rfc822, inline)]
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
+ (progn
+ (setq dumped-lisp-files '("subr" "emacs-lisp/backquote"
+ "emacs-lisp/byte-run"))
+ (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.
(load "version.el")
***************
*** 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)
This bug report was last modified 15 years and 246 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.