From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens Schmidt via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66136: 29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment Date: Thu, 21 Sep 2023 22:20:32 +0200 Message-ID: <87o7hvs2gf.fsf@sappc2.fritz.box> References: <58a3814205a241729c60ed277fa871b9@vodafonemail.de> Reply-To: Jens Schmidt 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="6818"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) To: 66136@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 21 22:22:15 2023 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 1qjQBj-0001US-8Y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Sep 2023 22:22:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjQBQ-0004TI-2E; Thu, 21 Sep 2023 16:21:56 -0400 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 1qjQBN-0004Si-3e for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2023 16:21:53 -0400 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 1qjQBM-00089f-Ng for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2023 16:21:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjQBW-00087M-Js for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2023 16:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jens Schmidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Sep 2023 20:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66136 X-GNU-PR-Package: emacs Original-Received: via spool by 66136-submit@debbugs.gnu.org id=B66136.169532766531115 (code B ref 66136); Thu, 21 Sep 2023 20:22:02 +0000 Original-Received: (at 66136) by debbugs.gnu.org; 21 Sep 2023 20:21:05 +0000 Original-Received: from localhost ([127.0.0.1]:34861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjQAa-00085m-DQ for submit@debbugs.gnu.org; Thu, 21 Sep 2023 16:21:04 -0400 Original-Received: from mr4.vodafonemail.de ([145.253.228.164]:35388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjQAU-000856-4r for 66136@debbugs.gnu.org; Thu, 21 Sep 2023 16:21:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1695327641; bh=4FWx+pise2/ZJSRXYhFf6IZWk9OntDhn3Lc/oMvWpFI=; h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent: Content-Type:From; b=Vpbveg7FWhVSyr4ORApk9REZymrmxl8EZOo6Bv8coY5fQhud5vOsZlxzKcPJ65HtG 4h3moQfXH4eF65XHi9IjQ0YR2YNvH9iWeqKh140326efbhiWGZaRqjSteLRzYDv/nl DsyJygog0t1SFcsYEUg7QMAXhJFO/3Q8/NisP+Cc= Original-Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4Rs6Gd4jGkz1xyr for <66136@debbugs.gnu.org>; Thu, 21 Sep 2023 20:20:41 +0000 (UTC) Original-Received: from sappc2 (port-92-194-222-253.dynamic.as20676.net [92.194.222.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4Rs6GY0yQQzKm4S for <66136@debbugs.gnu.org>; Thu, 21 Sep 2023 20:20:33 +0000 (UTC) In-Reply-To: <58a3814205a241729c60ed277fa871b9@vodafonemail.de> (Jens Schmidt's message of "Thu, 21 Sep 2023 12:44:01 +0200") X-purgate-type: clean X-purgate: clean X-purgate-size: 1873 X-purgate-ID: 155817::1695327637-2DFE558E-7C511C8B/0/0 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:271023 Archived-At: Smaller test case is -------------------- foo.el -------------------- ;;; -*- lexical-binding: t -*- (defun delete-process@emacs-fix (arg) "Allows interactive calls." (interactive "^P")) -------------------- foo.el -------------------- And even smaller might be (but I cannot interpret the results for sure) that -------------------- bad case -------------------- (byte-compile-preprocess '(defun delete-process@emacs-fix (arg) "Allows interactive calls." (interactive "^P"))) =3D> (defalias 'delete-process@emacs-fix #'(lambda (arg) "Allows interactive calls." (macroexp--funcall-if-compiled '#[0 "\300:\203 \0\303\304\300\"\202\0\304\300!\205\0\305\302\306\30= 1#\207" [lexical "Unused lexical argument =E2=80=98arg=E2=80=99" arg apply byte-compile-warning-enabled-p byte-compile-warn-x "%s"] 4...]) ;; this dangling interactive form ultimately seems to ;; trigger the warning (interactive "^P"))) -------------------- bad case -------------------- while -------------------- good case -------------------- (byte-compile-preprocess '(defun delete-process@emacs-fix (arg) "Allows interactive calls." (interactive "^P") nil)) =3D> (defalias 'delete-process@emacs-fix #'(lambda (arg) "Allows interactive calls." (interactive "^P") (macroexp--funcall-if-compiled '#[0 "\300:\203 \0\303\304\300\"\202\0\304\300!\205\0\305\302\306\30= 1#\207" [lexical "Unused lexical argument =E2=80=98arg=E2=80=99" arg apply byte-compile-warning-enabled-p byte-compile-warn-x "%s"] 4]) nil)) -------------------- good case -------------------- so `byte-compile-preprocess' could be the culprit here, inserting the warning wrapped into the `macroexp--funcall-if-compiled' in the wrong place.