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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 20 May 2025 15:44:58 +0300

> From: Sean Whitton <[email-masked]>
> 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.