all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: bug-gnu-emacs@gnu.org
Subject: bug#4473: after-load-functions: files are not absolute, some are missed
Date: Thu, 17 Sep 2009 19:02:51 -0400	[thread overview]
Message-ID: <rriqfh6up0.fsf@fencepost.gnu.org> (raw)


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)






             reply	other threads:[~2009-09-17 23:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5hiqfglqgc.fsf@fencepost.gnu.org>
2009-09-17 23:02 ` Glenn Morris [this message]
2009-09-17 23:38   ` bug#4473: after-load-functions: files are not absolute, some are missed Juanma Barranquero
2009-09-18  0:11   ` Juanma Barranquero
2009-09-18  0:19     ` Glenn Morris
2009-09-18  0:28       ` Juanma Barranquero
2009-09-18  3:05         ` Juanma Barranquero
2009-09-18  6:22           ` Glenn Morris
2009-09-18  3:13       ` Stefan Monnier
2009-09-18  3:16         ` Juanma Barranquero
2009-09-18  6:23         ` Glenn Morris
2009-09-18  9:10           ` Eli Zaretskii
2009-09-18  3:18   ` Juanma Barranquero
2009-09-18  6:30   ` bug#4473: marked as done (after-load-functions: files are not absolute, some are missed) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=rriqfh6up0.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=4473@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.