[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40636: [PATCH] Fix `eval-after-load' hooks not running on eln files.
From: |
Andrew Whatson |
Subject: |
bug#40636: [PATCH] Fix `eval-after-load' hooks not running on eln files. |
Date: |
Wed, 15 Apr 2020 13:59:25 +1000 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#40636: [PATCH] Fix `eval-after-load' hooks not running on eln files.,
Andrew Whatson <=