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

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 21 May 2025 17:20:04 +0000

Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78446: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78446
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78446: [PATCH] * lisp/emacs-lisp/find-func.el: Fix Eager macro-expansion failure
From: Stefan Monnier <[email-masked]>
To: Lin Sun <[email-masked]>
Cc: Eli Zaretskii <[email-masked]>, "[email-masked]" <[email-masked]>, Sean Whitton <[email-masked]>
Date: Wed, 21 May 2025 13:19:16 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

>> LGTM, except that the comment should begin with a capital letter.
> Sure, fixed in the attached patch. Thanks all of you.

Thanks, pushed to `master`.

        Stefan

Subject: [PATCH] * lisp/emacs-lisp/find-func.el: Fix Eager macro-expansion failure
From: Lin Sun <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 15 May 2025 22:14:35 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

A build error happened as follow (I upgrade to latest  version db198e0e59bff0c1cb28a591928377f5a0e9d158),
This patch will fix the build error.

Error: error ("Eager macro-expansion failure: (wrong-type-argument symbolp 'find-function-mode)")
  signal(error ("Eager macro-expansion failure: (wrong-type-argument symbolp 'find-function-mode)"))
  error("Eager macro-expansion failure: %S" (wrong-type-argument symbolp 'find-function-mode))
  internal-macroexpand-for-load((custom-declare-variable 'find-function-mode-lower-precedence `(funcall #',(lambda nil "" nil)) "If non-nil, `find-function-mode' defines keys in the global map.\nThis is for compatibility with the historical behavior of\nthe old `find-function-setup-keys'." :type 'boolean :version "31.1" :group 'find-function :set (lambda (symbol value) "hello" (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))))) t)
  eval-buffer(#<buffer  *load*-728608> nil "/tmp/emacs-dbg/lisp/emacs-lisp/find-func.el" nil t)
  load-with-code-conversion("/tmp/emacs-dbg/lisp/emacs-lisp/find-func.el" "/tmp/emacs-dbg/lisp/emacs-lisp/find-func.el" nil t)
  require(find-func)
  eval-buffer(#<buffer  *load*-987386> nil "/tmp/emacs-dbg/lisp/cedet/mode-local.el" nil t)
  load-with-code-conversion("/tmp/emacs-dbg/lisp/cedet/mode-local.el" "/tmp/emacs-dbg/lisp/cedet/mode-local.el" nil t)
  require(mode-local)
  eval-buffer(#<buffer  *load*-671861> nil "/tmp/emacs-dbg/lisp/cedet/semantic/fw.el" nil t)
  load-with-code-conversion("/tmp/emacs-dbg/lisp/cedet/semantic/fw.el" "/tmp/emacs-dbg/lisp/cedet/semantic/fw.el" nil t)
  require(semantic/fw)
  eval-buffer(#<buffer  *load*-479974> nil "/tmp/emacs-dbg/lisp/cedet/semantic/tag.el" nil t)
  load-with-code-conversion("/tmp/emacs-dbg/lisp/cedet/semantic/tag.el" "/tmp/emacs-dbg/lisp/cedet/semantic/tag.el" nil t)
  require(semantic/tag)
  eval-buffer(#<buffer  *load*-715339> nil "/tmp/emacs-dbg/lisp/cedet/semantic.el" nil t)
  load-with-code-conversion("/tmp/emacs-dbg/lisp/cedet/semantic.el" "/tmp/emacs-dbg/lisp/cedet/semantic.el" nil t)
  require(semantic)
  eval-buffer(#<buffer  *load*> nil "/tmp/emacs-dbg/lisp/cedet/semantic/bovine/grammar.el" nil t)
  load-with-code-conversion("/tmp/emacs-dbg/lisp/cedet/semantic/bovine/grammar.el" "/tmp/emacs-dbg/lisp/cedet/semantic/bovine/grammar.el" nil t)
  load("semantic/bovine/grammar" nil t)
  command-line-1(("--eval" "(setq load-prefer-newer t)" "-l" "semantic/bovine/grammar" "-f" "bovine-batch-make-parser" "-o" "../../lisp/cedet/semantic/bovine/c-by.el" "c.by"))
  command-line()
  normal-top-level()
$ "../../src/emacs" "-batch" "--no-site-file" "--no-site-lisp" "--eval" "(setq load-prefer-newer t)" "-l" "semantic/bovine/grammar" "-f" "bovine-batch-make-parser" "-o" "../../lisp/cedet/semantic/bovine/c-by.el" "c.by"
From 1d5b35579adb265e34bf0c5e72a863cea6b662f2 Mon Sep 17 00:00:00 2001
From: Lin Sun <[email-masked]>
Date: Thu, 15 May 2025 06:30:44 +0000
Subject: [PATCH] * lisp/emacs-lisp/find-func.el: Fix Eager macro-expansion
 failure

---
 lisp/emacs-lisp/find-func.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)))))
-- 
2.34.1