GNU bug report logs - #78446
[PATCH] * lisp/emacs-lisp/find-func.el: Fix Eager macro-expansion failure

Previous Next

Package: emacs;

Reported by: Lin Sun <sunlin7 <at> hotmail.com>

Date: Thu, 15 May 2025 22:21:02 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: sunlin7 <at> hotmail.com, monnier <at> iro.umontreal.ca, 78446 <at> debbugs.gnu.org
Subject: bug#78446: [PATCH] * lisp/emacs-lisp/find-func.el: Fix Eager macro-expansion failure
Date: Tue, 20 May 2025 15:44:58 +0300
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Tue, 20 May 2025 09:55:57 +0100
> 
> Hello,
> 
> Does this fix it:
> 
> > diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
> > index 6bdfb4bc38b..717bac09c81 100644
> > --- a/lisp/emacs-lisp/find-func.el
> > +++ b/lisp/emacs-lisp/find-func.el
> > @@ -207,7 +207,7 @@ find-function-mode-lower-precedence
> >    :set (lambda (symbol value)
> >           ;; Toggle the mode off before changing this setting in order to
> >           ;; avoid getting into an inconsistent state.
> > -         (let ((already-on find-function-mode))
> > +         (let ((already-on (bound-and-true-p find-function-mode)))
> >             (when already-on (find-function-mode -1))
> >             (set-default symbol value)
> >             (when already-on (find-function-mode 1)))))

I'd prefer the other solution, to move the setter function before its
first use, or its first use after the function is defined.  The
bound-and-true-p use looks strange in a file that defines the
function.




This bug report was last modified 24 days ago.

Previous Next


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