unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40636: [PATCH] Fix `eval-after-load' hooks not running on eln files.
@ 2020-04-15  3:59 Andrew Whatson
  2020-08-08 12:53 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Whatson @ 2020-04-15  3:59 UTC (permalink / raw)
  To: 40636; +Cc: Andrew Whatson

After loading, `do-after-load-evaluation' is called with "the absolute
true name of a file just loaded".  The `eval-after-load-helper' hook was
comparing this with `load-file-name' containing the mangled file name,
so never running.

* lisp/subr.el (eval-after-load): Compare against `load-true-file-name'
  to properly detect the loading of native-compiled files.
---
 lisp/subr.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index f7445d8c25..def2d9b184 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4603,7 +4603,7 @@ eval-after-load
                  (if (not load-file-name)
                      ;; Not being provided from a file, run func right now.
                      (funcall func)
-                   (let ((lfn load-file-name)
+                   (let ((lfn load-true-file-name)
                          ;; Don't use letrec, because equal (in
                          ;; add/remove-hook) would get trapped in a cycle.
                          (fun (make-symbol "eval-after-load-helper")))
-- 
2.26.1






^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#40636: [PATCH] Fix `eval-after-load' hooks not running on eln files.
  2020-04-15  3:59 bug#40636: [PATCH] Fix `eval-after-load' hooks not running on eln files Andrew Whatson
@ 2020-08-08 12:53 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-08 12:53 UTC (permalink / raw)
  To: Andrew Whatson; +Cc: 40636

Andrew Whatson <whatson@gmail.com> writes:

> After loading, `do-after-load-evaluation' is called with "the absolute
> true name of a file just loaded".  The `eval-after-load-helper' hook was
> comparing this with `load-file-name' containing the mangled file name,
> so never running.
>
> * lisp/subr.el (eval-after-load): Compare against `load-true-file-name'
>   to properly detect the loading of native-compiled files.

[...]

> -                   (let ((lfn load-file-name)
> +                   (let ((lfn load-true-file-name)

This is for the native-comp branch, I guess?  I had a look at it, and it
looks like a similar patch was applied the same day this bug report was
filed, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-08 12:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15  3:59 bug#40636: [PATCH] Fix `eval-after-load' hooks not running on eln files Andrew Whatson
2020-08-08 12:53 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).