From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#69290: declare-function doesn't work when combined with --eval and -batch Date: Tue, 20 Feb 2024 21:59:31 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32447"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.50.3 To: 69290@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 20 20:01:00 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 1rcVMR-0008Ar-K5 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Feb 2024 20:00:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcVMB-0003kD-44; Tue, 20 Feb 2024 14:00:43 -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 1rcVM9-0003iw-06 for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 14:00:41 -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 1rcVM8-0001k7-KH for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 14:00:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcVMU-0001VA-3V for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 14:01:02 -0500 X-Loop: help-debbugs@gnu.org 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-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17084556155629 (code B ref -1); Tue, 20 Feb 2024 19:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Feb 2024 19:00:15 +0000 Original-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 Original-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 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 1rcVLE-0003OK-SA for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2024 13:59:45 -0500 Original-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 Original-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) Original-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 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-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:280351 Archived-At: 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