GNU bug report logs - #43116
27.1; with-eval-after-load executes BODY multiple times for fortran

Previous Next

Package: emacs;

Reported by: Nonax <nonax <at> posteo.net>

Date: Sun, 30 Aug 2020 16:56:02 UTC

Severity: normal

Found in version 27.1

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Nonax <nonax <at> posteo.net>
Cc: 43116 <at> debbugs.gnu.org
Subject: Re: bug#43116: 27.1; with-eval-after-load executes BODY multiple
 times for fortran
Date: Sat, 12 Jun 2021 14:46:20 +0200
Nonax <nonax <at> posteo.net> writes:

> The following command will reproduce the bug: emacs -Q -l mwe.el f.f
>
> f.f does not have to exist, it just serves to open a buffer and enable
> fortran-mode.  The file mwe.el contains the following:
>
> (with-eval-after-load 'fortran
>   (if (boundp 'fortran-canary)
>       (message "..is cursed.")
>     (message "FORTRAN.."))
>   (defvar fortran-canary t))
> ;;; end of mwe.el
>
> The following message will appear in the *Message* buffer:
> FORTRAN..
> ..is cursed.
>
> suggesting BODY has been executed twice. 

Yup -- you and Alan diagnosed the problem (a recursive load in the
easymenu call), and I think the easiest fix here is just to do define
the menu at the end of fortran.el.  So I've now done this in Emacs 28.

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




This bug report was last modified 3 years and 340 days ago.

Previous Next


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