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#69533: 30.0.50; Wrong byte compilation of a certain apply syntax Date: Thu, 14 Mar 2024 09:52:52 +0200 Message-ID: <86msr1b67f.fsf@gnu.org> References: <8734t6n4r5.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1655"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69533@debbugs.gnu.org To: Michael Heerdegen , Stefan Monnier , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 14 08:53:45 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 1rkfuL-0000Be-Hw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Mar 2024 08:53:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkfu4-00077d-WA; Thu, 14 Mar 2024 03:53:29 -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 1rkfu3-00077G-UD for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 03:53:27 -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 1rkfu3-00075K-2D for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 03:53:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rkfuc-0006rm-Ef for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 03:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2024 07:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69533 X-GNU-PR-Package: emacs Original-Received: via spool by 69533-submit@debbugs.gnu.org id=B69533.171040283726382 (code B ref 69533); Thu, 14 Mar 2024 07:54:02 +0000 Original-Received: (at 69533) by debbugs.gnu.org; 14 Mar 2024 07:53:57 +0000 Original-Received: from localhost ([127.0.0.1]:48175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkfuX-0006rS-Fp for submit@debbugs.gnu.org; Thu, 14 Mar 2024 03:53:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkfuV-0006r7-Tu for 69533@debbugs.gnu.org; Thu, 14 Mar 2024 03:53:56 -0400 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 1rkftp-000747-Bp; Thu, 14 Mar 2024 03:53:14 -0400 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=jLZkhKNPM+nXELeo+O51bGEYX1ZyBGdj2zNTxTt8ZOU=; b=lcpPE8yjI620qm5s4yD/ KTWr/+muFxya4qCd8i6jy9zbGvDKBX4zSXaNdXcmnm5eLv6GIr7lIMjKYh49TBXdud+LYHdAJqKZ5 rPk92WbhvIYbPHzTI2/B1cReUlN2kUh0jU4/XqAx6hT0TNP4tDFLN7wbAcxl+279tP0YDY3icrQ6i o77AVIdopaSisY4Pk0Sn4f0p/sx/ZAuqlOCDpbesE2jNdHuRTxljibta7V+DIoe8t3Pw9UYF13RpR GZbtRd926V8R5eDuE40zXLzOnnf6tV10WTgZLaANZTtzZH2QC/WkKqpe33ouzuNWTJlgXSuOfT/f+ 1O4UoQagRSb5NQ==; In-Reply-To: <8734t6n4r5.fsf@web.de> (bug-gnu-emacs@gnu.org) 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:281588 Archived-At: > Date: Mon, 04 Mar 2024 02:51:42 +0100 > From: Michael Heerdegen via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > Hello, > > C-h f apply says: > > | ... > | With a single argument, call the argument's first element using the > | other elements as args. > > Issue 1: This doc sentence has to be moved after the following example, > because that example: > > | Thus, (apply '+ 1 2 '(3 4)) returns 10. > > is an example for the more widespread syntax. > > That sentence actually explains a special case: it tells that this is > also allowed: > > (apply '(+ 1 2)) ==> 3 > > > Issue 2: The byte compiler currently miscompiles such expressions: > > Expected: > > (funcall (lambda () (apply '(+ 1 2)))) ==> 3 > > but > > (funcall (byte-compile '(lambda () (apply '(+ 1 2))))) > ~~> Error: Invalid function: (+ 1 2) > > AFAIU this is `byte-optimize-apply's fault: > > (byte-optimize-apply '(apply '(+ 1 2))) > ==> (funcall '(+ 1 2) '+ '1 '2) ; Ouch! > Stefan and Mattias, any comments or suggestions?