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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 17 May 2025 13:06:51 +0300

> From: Lin Sun <[email-masked]>
> Date: Thu, 15 May 2025 22:14:35 +0000
> 
> 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"

I'm not sure I understand how this happened to you.  Was that a
bootstrap build?

Stefan, any comments or suggestions?