From unknown Tue Jun 17 01:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 19:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 69290@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17084556155629 (code B ref -1); Tue, 20 Feb 2024 19:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Feb 2024 19:00:15 +0000 Received: from localhost ([127.0.0.1]:46568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcVLj-0001Sj-Ag for submit@debbugs.gnu.org; Tue, 20 Feb 2024 14:00:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:49838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcVLd-0001SU-As for submit@debbugs.gnu.org; Tue, 20 Feb 2024 14:00:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcVLE-0003OK-SA for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 13:59:45 -0500 Received: from forward103b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:d103]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcVL9-0001O8-Rs for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 13:59:42 -0500 Received: from mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:5d87:0:640:2b2e:0]) by forward103b.mail.yandex.net (Yandex) with ESMTPS id 85185608E1 for ; Tue, 20 Feb 2024 21:59:32 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id VxWtNVuZ4mI0-ZP1H3K9p; Tue, 20 Feb 2024 21:59:32 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1708455572; bh=D05h7NiRPbY05x9b95HegaeskKUO0XuHcnPv8+izj2c=; h=Date:To:From:Subject:Message-ID; b=PbPpB38ifulsDX02bMHo+a/xgsA7TqXEHx5+G++7dSn6mNci+VG9qM+xCRukij3D0 HDzPzk0ZGOp/m/XCNCgNJDG7TC1Xwgq6eCx1kjehV0whnThTaUKH1fGxsdRfm8B8z1 XbB3R2aAf60nDvjmJuKzAFd/ZWDfLc9dnIOAlLKA= Authentication-Results: mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: From: Konstantin Kharlamov Date: Tue, 20 Feb 2024 21:59:31 +0300 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 MIME-Version: 1.0 Received-SPF: pass client-ip=2a02:6b8:c02:900:1:45:d181:d103; envelope-from=Hi-Angel@yandex.ru; helo=forward103b.mail.yandex.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.5 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.5 (----) Stumbled upon that while trying to improve CI in Evil mode. Enabling byte-c= ompilation causes warnings about `undo-redo` undeclared on older Emacs'es, so tried to= work around that with `declare-function`. Turns out it doesn't work. # Steps to reproduce (in terms of terminal commands) =CE=BB cat test.el ;;; -*- lexical-binding: t -*- (hello) =CE=BB emacs -batch --eval '(declare-function hello nil)' -f batch-byte= -compile test.el In end of data: test.el:2:2: Warning: the function =E2=80=98hello=E2=80=99 is not known= to be defined. ## Expected There's no warning ## Actual There's a warning about undeclared function which is declared # Additional information Versions tested: * commit d4d5830f8a0 built 3 weeks ago from master. * 27.1, 26.3, 25.3 From unknown Tue Jun 17 01:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 19:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Konstantin Kharlamov Cc: 69290@debbugs.gnu.org Received: via spool by 69290-submit@debbugs.gnu.org id=B69290.170845875511157 (code B ref 69290); Tue, 20 Feb 2024 19:53:01 +0000 Received: (at 69290) by debbugs.gnu.org; 20 Feb 2024 19:52:35 +0000 Received: from localhost ([127.0.0.1]:46715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWAN-0002tt-6g for submit@debbugs.gnu.org; Tue, 20 Feb 2024 14:52:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWAH-0002td-Qe for 69290@debbugs.gnu.org; Tue, 20 Feb 2024 14:52:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcW9p-00033o-QN; Tue, 20 Feb 2024 14:52:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=WlWRJ+eESxHfVYz4BMVsIqE86SzVW6587is4UURmqiU=; b=SI2Bnzp0xIvM8wC31XEn o+ZQpSqVnIvKzNL8UNJmXHAWYe3tE+wbXt/4LQaAR3R4b9cLDQesQ/VzidXL7gCfsBK0ryjiDmizY WumKlDa5y/sbrbh0x9ESDefrWKV35mzGym6JVxNhetgXDX3HEPTEYUMOXgILxuRWsLq40YfoGFB1G xj0UxnzIao6jA683vmy1kA1wJEsk4M2o+FezP5kiLxQb8bVRoEc4i6y3jTldzy2A0ztt5nFee5JVj 8N2LLwgKYVqIzg5GOz8tS4NU8+AbhOP3v4lUaWFZMKlCiSWsWk9fvL5AKVZFpXB3y3P4ei420adVz QVF0/8ZrPyyndg==; Date: Tue, 20 Feb 2024 21:51:59 +0200 Message-Id: <868r3eoqw0.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Konstantin Kharlamov on Tue, 20 Feb 2024 21:59:31 +0300) References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) > From: Konstantin Kharlamov > Date: Tue, 20 Feb 2024 21:59:31 +0300 > > Stumbled upon that while trying to improve CI in Evil mode. Enabling byte-compilation > causes warnings about `undo-redo` undeclared on older Emacs'es, so tried to work > around that with `declare-function`. Turns out it doesn't work. Of course it does. If used correctly, that is. We do that in gazillion places in our sources. > λ cat test.el > ;;; -*- lexical-binding: t -*- > (hello) > λ emacs -batch --eval '(declare-function hello nil)' -f batch-byte-compile test.el > > In end of data: > test.el:2:2: Warning: the function ‘hello’ is not known to be defined. > > ## Expected > > There's no warning What does the doc string of declare-function tell you about its usage and effect? From unknown Tue Jun 17 01:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 19:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 69290@debbugs.gnu.org Received: via spool by 69290-submit@debbugs.gnu.org id=B69290.170845899111501 (code B ref 69290); Tue, 20 Feb 2024 19:57:02 +0000 Received: (at 69290) by debbugs.gnu.org; 20 Feb 2024 19:56:31 +0000 Received: from localhost ([127.0.0.1]:46719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWEA-0002zR-SY for submit@debbugs.gnu.org; Tue, 20 Feb 2024 14:56:31 -0500 Received: from forward502b.mail.yandex.net ([178.154.239.146]:41806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWE7-0002zF-JK for 69290@debbugs.gnu.org; Tue, 20 Feb 2024 14:56:29 -0500 Received: from mail-nwsmtp-smtp-production-main-91.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-91.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:3019:0:640:a0d4:0]) by forward502b.mail.yandex.net (Yandex) with ESMTPS id F3A3F5EF95; Tue, 20 Feb 2024 22:56:02 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-91.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 2uX0jCFTtOs0-kzb8Iqzx; Tue, 20 Feb 2024 22:56:02 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1708458962; bh=RSGJcm5jSWHQVuoD2sdxsyB5C+pmzDJZ5G+eCAhk4Ko=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=RfIetAWHnNB+pBrqwXs/EZMpv+2+uI22CUBXgvUoHEN+/Xv0/XkrouI/iOpveLrc/ 04VogtjKhBVBZYMO1GG2ZBZioHZO+aDaL3ROEoRyjjS+haWzrOMA9ztyh6J2ubukHE vC+epRj+6nxUQRIBOKXp5YGa/kII4z1lvbnrGGuk= Authentication-Results: mail-nwsmtp-smtp-production-main-91.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> From: Konstantin Kharlamov Date: Tue, 20 Feb 2024 22:56:01 +0300 In-Reply-To: <868r3eoqw0.fsf@gnu.org> References: <868r3eoqw0.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) On Tue, 2024-02-20 at 21:51 +0200, Eli Zaretskii wrote: > > From: Konstantin Kharlamov > > Date: Tue, 20 Feb 2024 21:59:31 +0300 > >=20 > > Stumbled upon that while trying to improve CI in Evil mode. > > Enabling byte-compilation > > causes warnings about `undo-redo` undeclared on older Emacs'es, so > > tried to work > > around that with `declare-function`. Turns out it doesn't work. >=20 > Of course it does.=C2=A0 If used correctly, that is.=C2=A0 We do that in > gazillion places in our sources. >=20 > > =C2=A0=C2=A0=C2=A0 =CE=BB cat test.el > > =C2=A0=C2=A0=C2=A0 ;;; -*- lexical-binding: t -*- > > =C2=A0=C2=A0=C2=A0 (hello) > > =C2=A0=C2=A0=C2=A0 =CE=BB emacs -batch --eval '(declare-function hello = nil)' -f batch- > > byte-compile test.el > >=20 > > =C2=A0=C2=A0=C2=A0 In end of data: > > =C2=A0=C2=A0=C2=A0 test.el:2:2: Warning: the function =E2=80=98hello=E2= =80=99 is not known to be > > defined. > >=20 > > ## Expected > >=20 > > There's no warning >=20 > What does the doc string of declare-function tell you about its usage > and effect? It says `Tell the byte-compiler that function FN is defined, in FILE`, and then FILE may be nil. In the context of the problem it seems the only thing that's relevant. There's a lot more text, but the rest of it just explains behavior of different parameters. Is there anything I'm missing? From unknown Tue Jun 17 01:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 20:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Konstantin Kharlamov Cc: 69290@debbugs.gnu.org Received: via spool by 69290-submit@debbugs.gnu.org id=B69290.170845947512411 (code B ref 69290); Tue, 20 Feb 2024 20:05:02 +0000 Received: (at 69290) by debbugs.gnu.org; 20 Feb 2024 20:04:35 +0000 Received: from localhost ([127.0.0.1]:46740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWLy-0003E7-Ik for submit@debbugs.gnu.org; Tue, 20 Feb 2024 15:04:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWLv-0003Du-7O for 69290@debbugs.gnu.org; Tue, 20 Feb 2024 15:04:33 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcWLT-0004zh-I1; Tue, 20 Feb 2024 15:04:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=iuQ9Nkwo7m2+ZPTA+SXbg8Q37IG+8+RYtu9ofMHRE1c=; b=nxFqJgHQEX+Vqg1jzPut c2N7JO48XQhHvLLPG4ChgvBQWPGKOBOqm8h/Qk0qP6Puaw294FVH+uePAjUz+j4io5GwfIxRTVVkc HC2U0SFMi+Sr6NBa2VZp+TBvo2oFiPxJOCZOJXbT2eVtO+EIt9RGexghyeTGvd/sbfnzeyNhrW5bV sTk2Gak3YHkoGf9DVhW/jLiM9eYJnLpmmNvad0Fj1D38jSAc6quS/5ohwdvdZXdgJoN70z6XEr7FP /P/GcFPSToL9YQ+m75UGrkvle2kmIH9Otv9VjKKM/4hrl012BiKrT+a4fkzCvxHYl3L0P+vRddD4F w2MwTeCPyiWnNw==; Date: Tue, 20 Feb 2024 22:03:55 +0200 Message-Id: <867ciyoqc4.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> (message from Konstantin Kharlamov on Tue, 20 Feb 2024 22:56:01 +0300) References: <868r3eoqw0.fsf@gnu.org> <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) > From: Konstantin Kharlamov > Cc: 69290@debbugs.gnu.org > Date: Tue, 20 Feb 2024 22:56:01 +0300 > > On Tue, 2024-02-20 at 21:51 +0200, Eli Zaretskii wrote: > > >     λ emacs -batch --eval '(declare-function hello nil)' -f batch- > > > byte-compile test.el > > > > > >     In end of data: > > >     test.el:2:2: Warning: the function ‘hello’ is not known to be > > > defined. > > > > > > ## Expected > > > > > > There's no warning > > > > What does the doc string of declare-function tell you about its usage > > and effect? > > It says `Tell the byte-compiler that function FN is defined, in FILE`, > and then FILE may be nil. In the context of the problem it seems the > only thing that's relevant. There's a lot more text, but the rest of it > just explains behavior of different parameters. Is there anything I'm > missing? Does --eval '(declare-function hello nil)' tell anything to the byte-compiler? From unknown Tue Jun 17 01:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 20:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 69290@debbugs.gnu.org Received: via spool by 69290-submit@debbugs.gnu.org id=B69290.170846004413227 (code B ref 69290); Tue, 20 Feb 2024 20:15:01 +0000 Received: (at 69290) by debbugs.gnu.org; 20 Feb 2024 20:14:04 +0000 Received: from localhost ([127.0.0.1]:46744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWV6-0003Qo-Nz for submit@debbugs.gnu.org; Tue, 20 Feb 2024 15:14:04 -0500 Received: from forward502b.mail.yandex.net ([178.154.239.146]:39422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWV0-0003Qa-5H for 69290@debbugs.gnu.org; Tue, 20 Feb 2024 15:13:58 -0500 Received: from mail-nwsmtp-smtp-production-main-46.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-46.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:3285:0:640:fd1e:0]) by forward502b.mail.yandex.net (Yandex) with ESMTPS id F1A8B5EF79; Tue, 20 Feb 2024 23:13:28 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-46.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id RDYL5cv7XCg0-SpKXcfwn; Tue, 20 Feb 2024 23:13:28 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1708460008; bh=ep7xF9TQugAFw0VGDzQVpK/MD1WnUksR4BfzqgnUnUk=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=wq3nCuCc4cXSi10XnE7y1Q6vYyr7LYeHuFfD9LVq5ssRFcOlSB5GhU3cRYQpE28h3 DE1G7YRUya0T98QvQyuG2g7wTphEkPYEXAJyi1IhDTSr8VLtyElharILmiGRCcFBH/ DsLhutbMV8Ybx3Hb0YrZRQDU6dPNard7dewzx1cs= Authentication-Results: mail-nwsmtp-smtp-production-main-46.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <7c6965eaa2f67eaba8128228033dc0b0d0efb42b.camel@yandex.ru> From: Konstantin Kharlamov Date: Tue, 20 Feb 2024 23:13:27 +0300 In-Reply-To: <867ciyoqc4.fsf@gnu.org> References: <868r3eoqw0.fsf@gnu.org> <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> <867ciyoqc4.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) On Tue, 2024-02-20 at 22:03 +0200, Eli Zaretskii wrote: > > From: Konstantin Kharlamov > > Cc: 69290@debbugs.gnu.org > > Date: Tue, 20 Feb 2024 22:56:01 +0300 > >=20 > > On Tue, 2024-02-20 at 21:51 +0200, Eli Zaretskii wrote: > > > > =C2=A0=C2=A0=C2=A0 =CE=BB emacs -batch --eval '(declare-function he= llo nil)' -f > > > > batch- > > > > byte-compile test.el > > > >=20 > > > > =C2=A0=C2=A0=C2=A0 In end of data: > > > > =C2=A0=C2=A0=C2=A0 test.el:2:2: Warning: the function =E2=80=98hell= o=E2=80=99 is not known to > > > > be > > > > defined. > > > >=20 > > > > ## Expected > > > >=20 > > > > There's no warning > > >=20 > > > What does the doc string of declare-function tell you about its > > > usage > > > and effect? > >=20 > > It says `Tell the byte-compiler that function FN is defined, in > > FILE`, > > and then FILE may be nil. In the context of the problem it seems > > the > > only thing that's relevant. There's a lot more text, but the rest > > of it > > just explains behavior of different parameters. Is there anything > > I'm > > missing? >=20 > Does --eval '(declare-function hello nil)' tell anything to the > byte-compiler? Well, I can guess by the way you're asking that the answer is "no", but I have no idea why so. It should. It is the same as if you pop up Emacs, evaluate a (defun hello()) and then call `byte-compile-file` over the `test.el`. There won't be a warning, despite that `(defun hello ())` was never byte-compiled (AFAIK Emacs does note byte-compile evaluated code). From unknown Tue Jun 17 01:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 20:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Konstantin Kharlamov Cc: 69290@debbugs.gnu.org Received: via spool by 69290-submit@debbugs.gnu.org id=B69290.170846046613872 (code B ref 69290); Tue, 20 Feb 2024 20:22:02 +0000 Received: (at 69290) by debbugs.gnu.org; 20 Feb 2024 20:21:06 +0000 Received: from localhost ([127.0.0.1]:46749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWby-0003bf-3T for submit@debbugs.gnu.org; Tue, 20 Feb 2024 15:21:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWbt-0003b1-Hs for 69290@debbugs.gnu.org; Tue, 20 Feb 2024 15:21:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcWbS-00089c-0A; Tue, 20 Feb 2024 15:20:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=GblWj+gFtsM29r29jh098ws3o3xbY/LabJ2L/c+JhRw=; b=TXcycOtFS18N wU4o3FohXh6jLOqRYsrAN8N1UbPsWYxAs3MPBm0QKbdp0gtdtW5teAG4haOq7bqzykQkuwj380ZmX /zCdrL7e22y7WyqmIgd6dXIJ9fvkQEne0vrw7tfXt46rObBnuw3nXvpaCp3rHTF+O3rhEO+qKuEyo +2wGBG7iSpnnrzi65aJnJNgNT+CsuXZoc8iUqrYbOTdDIGkLRmWirq8U/BmHah82weo8AAGaF3F0Q ALy4huWhrMCGUjSmltbufz2Tz7w5nMe8pXbuy/K5Fj2fUGlFFQnqcnSzQ/Ecp+FH251KtFHoHe3hT tagQUAYMPbMK9FTQzMD1Zg==; Date: Tue, 20 Feb 2024 22:20:24 +0200 Message-Id: <865xyiopkn.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <7c6965eaa2f67eaba8128228033dc0b0d0efb42b.camel@yandex.ru> (message from Konstantin Kharlamov on Tue, 20 Feb 2024 23:13:27 +0300) References: <868r3eoqw0.fsf@gnu.org> <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> <867ciyoqc4.fsf@gnu.org> <7c6965eaa2f67eaba8128228033dc0b0d0efb42b.camel@yandex.ru> X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) > From: Konstantin Kharlamov > Cc: 69290@debbugs.gnu.org > Date: Tue, 20 Feb 2024 23:13:27 +0300 > > > Does --eval '(declare-function hello nil)' tell anything to the > > byte-compiler? > > Well, I can guess by the way you're asking that the answer is "no", but > I have no idea why so. It should. How can it? The declare-function form is evaluated by the startup code, and only after that the byte-compiler is invoked to compile test.el. At least this is my analysis of what happens here. > It is the same as if you pop up Emacs, evaluate a (defun hello()) > and then call `byte-compile-file` over the `test.el`. There won't be > a warning, despite that `(defun hello ())` was never byte-compiled > (AFAIK Emacs does note byte-compile evaluated code). For the declare-function form to take effect, the byte-compiler needs to evaluate the form. By contrast, defun is evaluated by the Lisp interpreter and the result is stored in the global state. From unknown Tue Jun 17 01:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 20:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 69290@debbugs.gnu.org Received: via spool by 69290-submit@debbugs.gnu.org id=B69290.170846117415063 (code B ref 69290); Tue, 20 Feb 2024 20:33:01 +0000 Received: (at 69290) by debbugs.gnu.org; 20 Feb 2024 20:32:54 +0000 Received: from localhost ([127.0.0.1]:46780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWnO-0003us-64 for submit@debbugs.gnu.org; Tue, 20 Feb 2024 15:32:54 -0500 Received: from forward500a.mail.yandex.net ([178.154.239.80]:55654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcWnI-0003uf-Kb for 69290@debbugs.gnu.org; Tue, 20 Feb 2024 15:32:52 -0500 Received: from mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net [IPv6:2a02:6b8:c0d:2a02:0:640:77d9:0]) by forward500a.mail.yandex.net (Yandex) with ESMTPS id CFF3061441; Tue, 20 Feb 2024 23:31:54 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id rVYD28jWruQ0-EmrAtPAL; Tue, 20 Feb 2024 23:31:54 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1708461114; bh=EUSR1Po6yOplXpeE2lmDSGoVflfQt4hMSHwBeq6xKxM=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=pvMOesK83CoahadKpM0RVTtypNG4/XAeGGlCSi1z7OQfPa+RHYmVVDzewvua7Y0fm Bt31qI8YAqmUMW2z6dOzIRfGyOYTmGJUGMN4dm7XEA2f+9HF/7rCiLLJ/sgYrObpqr g+DmDiG5FhM1lskiCaYSHzMtjX4zqcJQju6ZvW10= Authentication-Results: mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: From: Konstantin Kharlamov Date: Tue, 20 Feb 2024 23:31:53 +0300 In-Reply-To: <865xyiopkn.fsf@gnu.org> References: <868r3eoqw0.fsf@gnu.org> <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> <867ciyoqc4.fsf@gnu.org> <7c6965eaa2f67eaba8128228033dc0b0d0efb42b.camel@yandex.ru> <865xyiopkn.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) On Tue, 2024-02-20 at 22:20 +0200, Eli Zaretskii wrote: > > From: Konstantin Kharlamov > > Cc: 69290@debbugs.gnu.org > > Date: Tue, 20 Feb 2024 23:13:27 +0300 > >=20 > > > Does --eval '(declare-function hello nil)' tell anything to the > > > byte-compiler? > >=20 > > Well, I can guess by the way you're asking that the answer is "no", > > but > > I have no idea why so. It should. >=20 > How can it?=C2=A0 The declare-function form is evaluated by the startup > code, and only after that the byte-compiler is invoked to compile > test.el.=C2=A0 At least this is my analysis of what happens here. >=20 > > It is the same as if you pop up Emacs, evaluate a (defun hello()) > > and then call `byte-compile-file` over the `test.el`. There won't > > be > > a warning, despite that `(defun hello ())` was never byte-compiled > > (AFAIK Emacs does note byte-compile evaluated code). >=20 > For the declare-function form to take effect, the byte-compiler needs > to evaluate the form.=C2=A0 By contrast, defun is evaluated by the Lisp > interpreter and the result is stored in the global state. Oh, thank you for explanation, I see. It's doesn't seem to be obvious to a bystander, because from the side it seems like in Emacs byte- compiler and interpreter should work in a tandem, as in the example with evaluating (defun hello()). In Emacs context the doc-string that says `Tell the byte-compiler that function FN is defined` would read to me as "modify global state, which later will be read by byte-compiler to deem FN as defined". IOW, to me as a bystander the documentation string does not explain the difference, which is why we just had this somewhat long discussion before I understood why `declare-function` works this way. I guess the bug can be closed, sorry for the noise. From unknown Tue Jun 17 01:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2024 21:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 69290@debbugs.gnu.org Received: via spool by 69290-submit@debbugs.gnu.org id=B69290.170846455720676 (code B ref 69290); Tue, 20 Feb 2024 21:30:02 +0000 Received: (at 69290) by debbugs.gnu.org; 20 Feb 2024 21:29:17 +0000 Received: from localhost ([127.0.0.1]:46906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcXfw-0005NP-FB for submit@debbugs.gnu.org; Tue, 20 Feb 2024 16:29:16 -0500 Received: from forward500c.mail.yandex.net ([178.154.239.208]:57698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcXfs-0005NE-BJ for 69290@debbugs.gnu.org; Tue, 20 Feb 2024 16:29:14 -0500 Received: from mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:c19a:0:640:943d:0]) by forward500c.mail.yandex.net (Yandex) with ESMTPS id 95EFA612AA; Wed, 21 Feb 2024 00:28:47 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id kSZUJpJOmiE0-AI5h0LPN; Wed, 21 Feb 2024 00:28:47 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1708464527; bh=vQO7EI9D8yaqSP9dW34kcFWr+lBiJrLl6cSqRaz1cIc=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=l7o668ykM/qd5yCK9VB7sfknhrh0QQWOWkh9lov2ORLdRKZCXL0rORi3F5nWrVM9N HXNnce9uXKzyUkE00BFgHjm8YaOa1pm0iFjePjJvayoHjvpTDv4ly0eXv2gIJFtpfD 95F2cj5XB15o8OFJXBhJ/aFjXcBECGgMMfYBVHxM= Authentication-Results: mail-nwsmtp-smtp-production-main-17.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <53767a63f52ce77960e41d07cdfd40c4eaad75d4.camel@yandex.ru> From: Konstantin Kharlamov Date: Wed, 21 Feb 2024 00:28:46 +0300 In-Reply-To: References: <868r3eoqw0.fsf@gnu.org> <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> <867ciyoqc4.fsf@gnu.org> <7c6965eaa2f67eaba8128228033dc0b0d0efb42b.camel@yandex.ru> <865xyiopkn.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) On Tue, 2024-02-20 at 23:31 +0300, Konstantin Kharlamov wrote: > On Tue, 2024-02-20 at 22:20 +0200, Eli Zaretskii wrote: > > > From: Konstantin Kharlamov > > > Cc: 69290@debbugs.gnu.org > > > Date: Tue, 20 Feb 2024 23:13:27 +0300 > > >=20 > > > > Does --eval '(declare-function hello nil)' tell anything to the > > > > byte-compiler? > > >=20 > > > Well, I can guess by the way you're asking that the answer is > > > "no", > > > but > > > I have no idea why so. It should. > >=20 > > How can it?=C2=A0 The declare-function form is evaluated by the startup > > code, and only after that the byte-compiler is invoked to compile > > test.el.=C2=A0 At least this is my analysis of what happens here. > >=20 > > > It is the same as if you pop up Emacs, evaluate a (defun hello()) > > > and then call `byte-compile-file` over the `test.el`. There won't > > > be > > > a warning, despite that `(defun hello ())` was never byte- > > > compiled > > > (AFAIK Emacs does note byte-compile evaluated code). > >=20 > > For the declare-function form to take effect, the byte-compiler > > needs > > to evaluate the form.=C2=A0 By contrast, defun is evaluated by the Lisp > > interpreter and the result is stored in the global state. >=20 > Oh, thank you for explanation, I see. It's doesn't seem to be obvious > to a bystander, because from the side it seems like in Emacs byte- > compiler and interpreter should work in a tandem, as in the example > with evaluating (defun hello()). In Emacs context the doc-string that > says `Tell the byte-compiler that function FN is defined` would read > to > me as "modify global state, which later will be read by byte-compiler > to deem FN as defined". IOW, to me as a bystander the documentation > string does not explain the difference, which is why we just had this > somewhat long discussion before I understood why `declare-function` > works this way. Btw, I just figured out how to show you why this doc-string doesn't say anything on the matter. Imagine for a second that `declare-function` is getting through from "eval" to the byte-compiler, i.e. the problem we're discussing is just not present. Would you change the string `Tell the byte-compiler that function FN is defined` to something else in this case? I would not, because it's still byte-compiler that does all the checking, so the point that "declare-function" is purposed for `byte-compiler` stands. From unknown Tue Jun 17 01:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Feb 2024 03:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69290 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Konstantin Kharlamov , Stefan Monnier Cc: 69290@debbugs.gnu.org Received: via spool by 69290-submit@debbugs.gnu.org id=B69290.170848625824818 (code B ref 69290); Wed, 21 Feb 2024 03:31:01 +0000 Received: (at 69290) by debbugs.gnu.org; 21 Feb 2024 03:30:58 +0000 Received: from localhost ([127.0.0.1]:47529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcdJx-0006SD-EA for submit@debbugs.gnu.org; Tue, 20 Feb 2024 22:30:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcdJt-0006Ry-9E for 69290@debbugs.gnu.org; Tue, 20 Feb 2024 22:30:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcdJR-00045x-4n; Tue, 20 Feb 2024 22:30:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=RGo3LJGQw898vbAm4uYmmkKjhPYRkXpPNUydfHDn8LU=; b=ljY7nQwQGx+Q1zl8F5XH 6D4KiC5GU8HGB2CFiiMnSCYnu0TIk/qrOarv79RQ4b0TqRa0HizUF3xBpwUvYrJg0LDCFngmCNj/j 8pjYFjm4Qj/M1LqeDo89Y7hJ8raHktZ8u54okJei6d9SctE8di5Rvya49X/koT1h9qFnKpWtocGzN PqL1DJr2upDigRdXk4evviFAv3ME+RsVyp0W7uj0mW7B7Sf2j8MqRqDk7V6400fS/+lCuu0hOij0Z TnEixqBjz8t47oeO7Jyk4terh3TZp3PP4JYRKY0qRu2JvTgjyc0NsIdnXqja6qd9EXNlcOnvY6Ivp UjnYr/yDEdv0Ag==; Date: Wed, 21 Feb 2024 05:30:22 +0200 Message-Id: <864je2o5o1.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <53767a63f52ce77960e41d07cdfd40c4eaad75d4.camel@yandex.ru> (message from Konstantin Kharlamov on Wed, 21 Feb 2024 00:28:46 +0300) References: <868r3eoqw0.fsf@gnu.org> <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> <867ciyoqc4.fsf@gnu.org> <7c6965eaa2f67eaba8128228033dc0b0d0efb42b.camel@yandex.ru> <865xyiopkn.fsf@gnu.org> <53767a63f52ce77960e41d07cdfd40c4eaad75d4.camel@yandex.ru> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) > From: Konstantin Kharlamov > Cc: 69290@debbugs.gnu.org > Date: Wed, 21 Feb 2024 00:28:46 +0300 > > On Tue, 2024-02-20 at 23:31 +0300, Konstantin Kharlamov wrote: > > On Tue, 2024-02-20 at 22:20 +0200, Eli Zaretskii wrote: > > > > From: Konstantin Kharlamov > > > > Cc: 69290@debbugs.gnu.org > > > > Date: Tue, 20 Feb 2024 23:13:27 +0300 > > > > > > > > > Does --eval '(declare-function hello nil)' tell anything to the > > > > > byte-compiler? > > > > > > > > Well, I can guess by the way you're asking that the answer is > > > > "no", > > > > but > > > > I have no idea why so. It should. > > > > > > How can it?  The declare-function form is evaluated by the startup > > > code, and only after that the byte-compiler is invoked to compile > > > test.el.  At least this is my analysis of what happens here. > > > > > > > It is the same as if you pop up Emacs, evaluate a (defun hello()) > > > > and then call `byte-compile-file` over the `test.el`. There won't > > > > be > > > > a warning, despite that `(defun hello ())` was never byte- > > > > compiled > > > > (AFAIK Emacs does note byte-compile evaluated code). > > > > > > For the declare-function form to take effect, the byte-compiler > > > needs > > > to evaluate the form.  By contrast, defun is evaluated by the Lisp > > > interpreter and the result is stored in the global state. > > > > Oh, thank you for explanation, I see. It's doesn't seem to be obvious > > to a bystander, because from the side it seems like in Emacs byte- > > compiler and interpreter should work in a tandem, as in the example > > with evaluating (defun hello()). In Emacs context the doc-string that > > says `Tell the byte-compiler that function FN is defined` would read > > to > > me as "modify global state, which later will be read by byte-compiler > > to deem FN as defined". IOW, to me as a bystander the documentation > > string does not explain the difference, which is why we just had this > > somewhat long discussion before I understood why `declare-function` > > works this way. > > Btw, I just figured out how to show you why this doc-string doesn't say > anything on the matter. Imagine for a second that `declare-function` is > getting through from "eval" to the byte-compiler, i.e. the problem > we're discussing is just not present. Would you change the string `Tell > the byte-compiler that function FN is defined` to something else in > this case? I would not, because it's still byte-compiler that does all > the checking, so the point that "declare-function" is purposed for > `byte-compiler` stands. Stefan, any comments or suggestion for how best to document this (if I'm right)?