GNU bug report logs - #40636
[PATCH] Fix `eval-after-load' hooks not running on eln files.

Previous Next

Package: emacs;

Reported by: Andrew Whatson <whatson <at> gmail.com>

Date: Wed, 15 Apr 2020 05:31:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40636 in the body.
You can then email your comments to 40636 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#40636; Package emacs. (Wed, 15 Apr 2020 05:31:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Whatson <whatson <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 15 Apr 2020 05:31:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrew Whatson <whatson <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Andrew Whatson <whatson <at> gmail.com>
Subject: [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





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40636; Package emacs. (Sat, 08 Aug 2020 12:54:01 GMT) Full text and rfc822 format available.

Message #8 received at 40636 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: 40636 <at> debbugs.gnu.org
Subject: Re: bug#40636: [PATCH] Fix `eval-after-load' hooks not running on
 eln files.
Date: Sat, 08 Aug 2020 14:53:07 +0200
Andrew Whatson <whatson <at> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 08 Aug 2020 12:54:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 40636 <at> debbugs.gnu.org and Andrew Whatson <whatson <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 08 Aug 2020 12:54:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 06 Sep 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.