From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58396: 29.0.50; Optimization failure for add-to-list Date: Mon, 10 Oct 2022 23:46:46 -0400 Message-ID: References: <87o7uknkyx.fsf@gnus.org> <87fsfwnkl4.fsf@gnus.org> <87a663kxtz.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14609"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: German Pacenza , 58396@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 11 05:47:17 2022 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 1oi6Ef-0003bb-Iz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Oct 2022 05:47:17 +0200 Original-Received: from localhost ([::1]:54358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oi6Ee-0003RY-Hv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Oct 2022 23:47:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oi6EQ-0003Oi-Sd for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2022 23:47:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oi6EQ-0007uD-KR for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2022 23:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oi6EQ-00021V-Ak for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2022 23:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 03:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58396 X-GNU-PR-Package: emacs Original-Received: via spool by 58396-submit@debbugs.gnu.org id=B58396.16654600197767 (code B ref 58396); Tue, 11 Oct 2022 03:47:02 +0000 Original-Received: (at 58396) by debbugs.gnu.org; 11 Oct 2022 03:46:59 +0000 Original-Received: from localhost ([127.0.0.1]:50475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oi6EM-00021D-Tx for submit@debbugs.gnu.org; Mon, 10 Oct 2022 23:46:59 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:55977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oi6EJ-00020z-VP for 58396@debbugs.gnu.org; Mon, 10 Oct 2022 23:46:56 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0CB6A80A18; Mon, 10 Oct 2022 23:46:50 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7B49380073; Mon, 10 Oct 2022 23:46:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665460008; bh=b9jOcNdTSuByIfcjbsNunaRu06lwfJMOg+zY7EsdzAc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WqbL7/thhJOa70xvU1kIbNu7+rZi4wpvo1HgZG17pXpOQapjgr/fQ3ykKm30Q26/I tpUcq2Ar6npfZv9A1IscsDirD66pZtxozh7u6fqPiuL86K1trEJLcPZPG+Z8Z9q6Wr YOgIUbJo9V/RXSiclbrV9P0SgXRf585+QjrQntaCsD1pMK9CPPvbMVq7DsM54PIQ6N UPIKugC9ve8Mp7K2Z8tbF3Oa4QuIVpmxBA8zzrjO9rke73mTpm3q/03UV6Uu6tX1VP m7N7aSzUwEDg4W/9eEyy81tqvlOTpprsvufNkEcc/kXlSrWjBDEwGlPgMe9twztloZ 4O0WfTR3q7JeA== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3E0C1120909; Mon, 10 Oct 2022 23:46:48 -0400 (EDT) In-Reply-To: <87a663kxtz.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 11 Oct 2022 02:28:40 +0200") 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" Xref: news.gmane.io gmane.emacs.bugs:245081 Archived-At: Lars Ingebrigtsen [2022-10-11 02:28:40] wrote: > Stefan Monnier writes: >> I'm not sure which part you don't understand above, so I'll only explain >> the general situation: to allow completion of local variable names, we >> analyze the surrounding code, but in order to do that without having to >> write ad-hoc code that knows about all the macros out there that can >> introduce new vars, we take the "surrounding code" and macroexpand the >> hell out of it so that we can then traverse the result looking only for >> `let/let*/lambda/condition-case`. > > But why is it calling add-to-list--anon-cmacro with the wrong number of > parameters? Because that's the sort of error you can get if you try to macro-expand code that's syntactically invalid. E.g. try to compile a file with (add-to-list x) and you should see a similar error. For `elisp--local-variables`, syntactically invalid code is the normal case (more or less) both because it's used when we're in the middle of writing the code, and also because of how it works (it takes the code from beginning-of-defun up to point and throws away whatever follows, just adding enough closing parens that the resutling string is `read`able). Stefan