From unknown Sat Sep 13 08:57:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#40636: [PATCH] Fix `eval-after-load' hooks not running on eln files. Resent-From: Andrew Whatson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Apr 2020 05:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40636 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 40636@debbugs.gnu.org Cc: Andrew Whatson X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15869286053340 (code B ref -1); Wed, 15 Apr 2020 05:31:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Apr 2020 05:30:05 +0000 Received: from localhost ([127.0.0.1]:35132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOace-0000rm-FD for submit@debbugs.gnu.org; Wed, 15 Apr 2020 01:30:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:36796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOZDA-0006zr-0y for submit@debbugs.gnu.org; Tue, 14 Apr 2020 23:59:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50834) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOZD8-0001s3-Qq for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2020 23:59:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOZD7-0001bf-U1 for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2020 23:59:38 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:36645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOZD7-0001bH-NJ for bug-gnu-emacs@gnu.org; Tue, 14 Apr 2020 23:59:37 -0400 Received: by mail-pg1-x543.google.com with SMTP id c23so914047pgj.3 for ; Tue, 14 Apr 2020 20:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SyULkyqpciXSy6b5NedQHHYAIvmI47SvXb3zR4IiQ7I=; b=u1Ab7hSxZpdYrejJHYIG1N0kC42+zWhu88RswpuXJe5dk/cBCnTfdLSzsHvm6LmLvr z00uNgWDMYMZNQyahDLtWQjg200v5XDW+KOvXXk0uu34eIwbA0PMvktTjOrLFWkTBKUX ljmzbj86MVNgrUOd6scGEo9dYmVZK9gSKTE8DrFglFtX9eYY1iaMXm3HmQSQ6Or+WaXU EDedoG/9XAkzJVXYunClXF9kTBTHtq80EY7Dm5dEBPyHrukPm3Bmb+PRVPaG6nLXZoWM KVIa3dE9le2rCSMdPG/h9pW7z4R4md/6hx1m8UDoLvevLm8nY+RWBoYcuavF/GbinKm2 PDeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SyULkyqpciXSy6b5NedQHHYAIvmI47SvXb3zR4IiQ7I=; b=oufcmPjSDcjGO4eigSbpGwnVPBq7Q3M5mDwn9JhCAUjj1ZWqR74kUR61shtGLc34wp 58dpc99DehpHx6XCRgCYaO2MoqpqEwpF/sF7I7Tc1aJhdSH5G1gDJ8ieL0jyCzhq0kW/ TDga6wR+aXQNALetyMW3uXz113ZGBijewnGCVcERUcEeaO0YNuRwhLSrkgHUnjFw/Tjn Gol1N8x5pPv21tdwJs7kWPvYl4Rvz3V2IcUZ2lySRYrPoIq5R3mUzx2xCXHBToerEzX7 p9Si3AbHPQTFIXBRWz7BSj6UsI4vdKimGg46mNfgR2RzzD6xjK3F/Gf1IftPcwF571aT 7qWQ== X-Gm-Message-State: AGi0Pub/ySr+VazhT24YJgyjVbk2CppXxefa4/giMkeV1MJztjcoogBR vrPSZWwuzdgK57jRcdTzc5aO1JqE X-Google-Smtp-Source: APiQypKZe+GRIKb2Wj2NN6bDJfAzTbYjGbGMvi4ThLHeMegZVgqroDjTtMQ+CwV4tojJ8r4epPzkfw== X-Received: by 2002:a63:e18:: with SMTP id d24mr11143510pgl.217.1586923176037; Tue, 14 Apr 2020 20:59:36 -0700 (PDT) Received: from muon.fritz.box (114-198-62-87.dyn.iinet.net.au. [114.198.62.87]) by smtp.gmail.com with ESMTPSA id o15sm11356371pgj.60.2020.04.14.20.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 20:59:35 -0700 (PDT) From: Andrew Whatson Date: Wed, 15 Apr 2020 13:59:25 +1000 Message-Id: <20200415035925.1923378-1-whatson@gmail.com> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 mangl [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (whatson[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 2.0 SPOOFED_FREEMAIL No description available. X-Mailman-Approved-At: Wed, 15 Apr 2020 01:30:03 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From unknown Sat Sep 13 08:57:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#40636: [PATCH] Fix `eval-after-load' hooks not running on eln files. Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Aug 2020 12:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40636 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Andrew Whatson Cc: 40636@debbugs.gnu.org Received: via spool by 40636-submit@debbugs.gnu.org id=B40636.159689120318651 (code B ref 40636); Sat, 08 Aug 2020 12:54:01 +0000 Received: (at 40636) by debbugs.gnu.org; 8 Aug 2020 12:53:23 +0000 Received: from localhost ([127.0.0.1]:58461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4OLi-0004ql-Va for submit@debbugs.gnu.org; Sat, 08 Aug 2020 08:53:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4OLf-0004qU-SN for 40636@debbugs.gnu.org; Sat, 08 Aug 2020 08:53:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=B66h2Ap36GfZSWh5x0uCC4bHkANyg0ZPWUbrVDqqzjQ=; b=UW4Le8gDwaQXZAABWFdRKEdsxq 7aed+dIRWBjiQCp9nFngJtgc0/0hqLCbn9BPa2Jy0dR64UFdUsESbFe7ndHI82ekAEeYPbK8HWoJU 3/xzqJ9lBd0FGYMSVD75bhDxmvk7OgAhjPb6teVufTIIPoWxXRsGKJO2ED3nbUhazQyY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4OLU-0004TH-Vn; Sat, 08 Aug 2020 14:53:13 +0200 From: Lars Ingebrigtsen References: <20200415035925.1923378-1-whatson@gmail.com> Date: Sat, 08 Aug 2020 14:53:07 +0200 In-Reply-To: <20200415035925.1923378-1-whatson@gmail.com> (Andrew Whatson's message of "Wed, 15 Apr 2020 13:59:25 +1000") Message-ID: <87pn811eq4.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Andrew Whatson 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 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andrew Whatson 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 08 08:53:30 2020 Received: (at control) by debbugs.gnu.org; 8 Aug 2020 12:53:30 +0000 Received: from localhost ([127.0.0.1]:58464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4OLq-0004r4-5d for submit@debbugs.gnu.org; Sat, 08 Aug 2020 08:53:30 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4OLo-0004qs-GR for control@debbugs.gnu.org; Sat, 08 Aug 2020 08:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=L+l2DQLvc6oveDBU3Lj+Pu0i+frPOas9IlwI2pIt9WA=; b=S9nJdpScgp0k6XjRGwow7FLda5 Fba0JuPSKfwnySl5+tM5Frg+b29t+dH2Wqy2QOoAHhL8BmZxlFbk5XSbTLDY2gID0dxPttSzWUA1s +e8EM8ilRJihyGFoFxSzaorEeXCut8DilyoYT+kWZkrsQAS0826sF12L+1WbF6sC8x/E=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4OLg-0004TY-Lv for control@debbugs.gnu.org; Sat, 08 Aug 2020 14:53:22 +0200 Date: Sat, 08 Aug 2020 14:53:19 +0200 Message-Id: <87o8nl1eps.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #40636 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 40636 fixed close 40636 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 40636 fixed close 40636 28.1 quit