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#46722: test-map-into fails Date: Wed, 05 Jan 2022 10:17:19 -0500 Message-ID: References: <871r2yu8b1.fsf@gnus.org> <87czl7w4fh.fsf@dick> 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="40342"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Glenn Morris , smonnier , Stefan Kangas , contovob@tcd.ie, 46722@debbugs.gnu.org, Lars Ingebrigtsen To: dick Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 05 16:18:23 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 1n583R-000AAe-Ue for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jan 2022 16:18:22 +0100 Original-Received: from localhost ([::1]:52910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n583Q-0000Lj-ID for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jan 2022 10:18:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n583A-0000KN-65 for bug-gnu-emacs@gnu.org; Wed, 05 Jan 2022 10:18:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5838-0007Ii-NH for bug-gnu-emacs@gnu.org; Wed, 05 Jan 2022 10:18:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n5838-0006nV-BR for bug-gnu-emacs@gnu.org; Wed, 05 Jan 2022 10:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jan 2022 15:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46722 X-GNU-PR-Package: emacs Original-Received: via spool by 46722-submit@debbugs.gnu.org id=B46722.164139584926070 (code B ref 46722); Wed, 05 Jan 2022 15:18:02 +0000 Original-Received: (at 46722) by debbugs.gnu.org; 5 Jan 2022 15:17:29 +0000 Original-Received: from localhost ([127.0.0.1]:41440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n582b-0006mP-8G for submit@debbugs.gnu.org; Wed, 05 Jan 2022 10:17:29 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n582Z-0006mB-Oi for 46722@debbugs.gnu.org; Wed, 05 Jan 2022 10:17:28 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D17E610013B; Wed, 5 Jan 2022 10:17:21 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7D9111002E3; Wed, 5 Jan 2022 10:17:20 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1641395840; bh=wETTDl+cD0/IJtXkEtztN49t1Ozylh2kfnknJy9cam4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Y9+7pSWZBQHXXk9rsEzRr/cc80jRjxc6QlAVS3I6VnG5baiaEuZk+PQwaxYc1oWHu e9Wr1s0wNubimpxmjIl9eZYnr+UjRJH9eQrMchb4F3aWiZFkSw8LahLufH1yjN6YpU UEZqigZa/LvhvnXG7HwKwOs+ZdxY38nJHyqTrRy6hgcqOEa/heMmXVuu3KvRQhY+hh wioK83ylRCpxwjgcd4sSmZE0wTlyUwlkwNXAWb0arOO53UCtK2Vo3KNtEPQw6zIV+S /NYC33xKiVGrrsGKNg5VML69PeCrOBjaNSCZRHKWsXWNKei/JoNV2sWKbblqpIhkyq emkEgwciCgLYQ== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 417E212025D; Wed, 5 Jan 2022 10:17:20 -0500 (EST) In-Reply-To: <87czl7w4fh.fsf@dick> (dick's message of "Tue, 04 Jan 2022 16:56:34 -0500") 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:223691 Archived-At: > You can't do, > > (funcall > (funcall > (backquote > (lambda (arg) > (lambda () arg))) > t)) > > which is what `cl--generic-get-dispatcher` tries to do. Is it? Where does `cl--generic-get-dispatcher` do that? Oh, you mean we don't guarantee that we use static scoping? I think I see what mean. Does the patch below help? Stefan diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 983694204df..686a2375971 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -644,7 +644,8 @@ cl--generic-get-dispatcher ;; FIXME: For generic functions with a single method (or with 2 methods, ;; one of which always matches), using a tagcode + hash-table is ;; overkill: better just use a `cl-typep' test. - (byte-compile + (funcall + (lambda (exp) (let ((lexical-binding t)) (byte-compile exp))) `(lambda (generic dispatches-left methods) ;; FIXME: We should find a way to expand `with-memoize' once ;; and forall so we don't need `subr-x' when we get here.