Subject: 30.0.92; declare-function should respect defun/lambda scope

From: Daniel Mendler <[email-masked]>
Date: Tue, 10 Dec 2024 14:10:42 +0100

`declare-function' can be used inside of `defun' or `lambda', but the
declaration still applies to the entire file. The declaration should
only apply to the scope where it is defined.

(I've seen this problem mentioned multiple times, but I am not sure if
there is already an issue to track the problem. Feel free to close/merge
the issues if I missed this.)

In GNU Emacs 30.0.92 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.2, Xaw scroll bars)