From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Recursive Fload and eval-after-load forms. (See bug #43116.) Date: Mon, 31 Aug 2020 18:45:26 +0000 Message-ID: <20200831184526.GB4176@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21002"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Nonax To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 31 20:50:19 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCosl-0005NR-NJ for ged-emacs-devel@m.gmane-mx.org; Mon, 31 Aug 2020 20:50:19 +0200 Original-Received: from localhost ([::1]:47776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCosk-0001QX-9M for ged-emacs-devel@m.gmane-mx.org; Mon, 31 Aug 2020 14:50:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCooA-00036l-Ph for emacs-devel@gnu.org; Mon, 31 Aug 2020 14:45:35 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:45777 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1kCoo8-0007wk-L5 for emacs-devel@gnu.org; Mon, 31 Aug 2020 14:45:34 -0400 Original-Received: (qmail 37495 invoked by uid 3782); 31 Aug 2020 18:45:28 -0000 Original-Received: from acm.muc.de (p4fe15b2d.dip0.t-ipconnect.de [79.225.91.45]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Mon, 31 Aug 2020 20:45:27 +0200 Original-Received: (qmail 8200 invoked by uid 1000); 31 Aug 2020 18:45:26 -0000 Content-Disposition: inline X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/31 14:45:28 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L3=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:254451 Archived-At: Hello, Emacs. In bug #43116, the OP has rightly complained that on loading fortran.elc, his eval-after-load forms get evaluated twice. The cause of the double evaluation is a custom-menu-create form in fortran.el, which causes a recursive evaluation of (load "fortran"). The eval-after-load-forms are evaluated both for the "inner" load and the "outer" load. What do people think of the following proposal: that the eval-after-load forms should be evaluated only after the outermost load has completed? This would be a simple amendment to the function Fload. -- Alan Mackenzie (Nuremberg, Germany).