From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Date: Tue, 20 Feb 2024 22:03:55 +0200 Message-ID: <867ciyoqc4.fsf@gnu.org> References: <868r3eoqw0.fsf@gnu.org> <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30378"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69290@debbugs.gnu.org To: Konstantin Kharlamov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 20 21:05:01 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rcWMP-0007Zz-8d for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Feb 2024 21:05:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcWM5-0002BZ-Ur; Tue, 20 Feb 2024 15:04:41 -0500 Original-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 1rcWM4-0002BB-TU for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 15:04:40 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rcWM4-00053B-LR for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 15:04:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcWMQ-0003Es-1Y for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 15:05:02 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 69290-submit@debbugs.gnu.org id=B69290.170845947512411 (code B ref 69290); Tue, 20 Feb 2024 20:05:02 +0000 Original-Received: (at 69290) by debbugs.gnu.org; 20 Feb 2024 20:04:35 +0000 Original-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 Original-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 Original-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==; In-Reply-To: <2f376e6d58b58f3fa8afa5376018a37b1ba3fab4.camel@yandex.ru> (message from Konstantin Kharlamov on Tue, 20 Feb 2024 22:56:01 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280355 Archived-At: > 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?