Subject: bug#77341: [PATCH] ; (find-function-search-for-symbol): Be cautious with macros.

From: Daniel Colascione <[email-masked]>
Date: Fri, 28 Mar 2025 15:43:35 -0400

On March 28, 2025 1:28:06 PM EDT, "Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email-masked]> wrote:
>Tags: patch
>
>Hi,
>
>find-function may expand Lisp macros in a source file when it fails to
>find a definition otherwise.  This patch restricts this fallback to
>trusted buffers only, to protect against possibly harmful macros.

I get not wanting to execute code from random files I'm just visiting, but if I've already actually evaluated a macro function and installed it in my Emacs function namespace as something I can call, is it all that dangerous to call it? Instead of a blanket prohibition on macro expansion, I'd rather have macros declare that they're safe to run on untrusted inputs, which means mostly they don't eval their arguments.