X-Loop: help-debbugs@HIDDEN Subject: bug#66342: Quote cl-generic-current-method-specializers Resent-From: Thuna <thuna.cing@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 04 Oct 2023 14:20:02 +0000 Resent-Message-ID: <handler.66342.B.16964291469801 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 66342 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 66342 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.16964291469801 (code B ref -1); Wed, 04 Oct 2023 14:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Oct 2023 14:19:06 +0000 Received: from localhost ([127.0.0.1]:45087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qo2iQ-0002Y1-8x for submit <at> debbugs.gnu.org; Wed, 04 Oct 2023 10:19:06 -0400 Received: from lists.gnu.org ([2001:470:142::17]:43644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <thuna.cing@HIDDEN>) id 1qo2iN-0002XR-6t for submit <at> debbugs.gnu.org; Wed, 04 Oct 2023 10:19:04 -0400 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 <thuna.cing@HIDDEN>) id 1qo2hz-0005qF-SI for bug-gnu-emacs@HIDDEN; Wed, 04 Oct 2023 10:18:39 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <thuna.cing@HIDDEN>) id 1qo2hn-0005Pq-Fd for bug-gnu-emacs@HIDDEN; Wed, 04 Oct 2023 10:18:32 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-32487efc319so2175826f8f.1 for <bug-gnu-emacs@HIDDEN>; Wed, 04 Oct 2023 07:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696429103; x=1697033903; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=rcP5KpbGStOpdqvgLQx6g47+cesEe1o3XGGEZZke+tg=; b=JjsqNn36WBhrHttfeD3VNNpCGPVaYQjsPC4XcTWuwNGlUm5PiJTeYftat/v+Leev0d j3IJ2W/FEyyo1PAg/lmEyWJRlVqTB4++gP+rQ8oBO1EUAnBjHfYxFlOGwUwASPLVErcG lpLdJkV5MAbIUcIvYv46PoOY+y11BkwWsO28AafGXicVcpRzCiS/kcpTjUdXejaG0qM0 4+cCInU1SjQdlcXBBoaGQE9wRQnroeW+ZEtXQSmuPVlrkk2YiKEyncVWSI/w+HLbMu3X 2NCLlx9HD4Squ7vsh5p0UIkiBHgjt8q/XNah9nZRdetuzlmNKE/2f/os0F73YyX1eZf5 0uIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696429103; x=1697033903; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rcP5KpbGStOpdqvgLQx6g47+cesEe1o3XGGEZZke+tg=; b=P+OsP7Sp3yH8nw2AgrIKD6O49lqG/sDtt+oLLl7JlAMbdA0Y6sJkVNUeF93m8TIOJ8 4CpeiwVKF3L9OEGzaVTmB30XC/BujxeBDxMgM0j2q9jKxSRL2yRuPWbPskD6vs1px/7/ kI9tvPYsGa+s4AQWyhaiA6irR2gNy+++M8rm/GyIZk9idg56IYn0B5j/fbOZBj9AnPtQ Y8pIXkGLuIJeOQrr7oymYXjw7mQyL0zYMEEb8qZEpGqwCvJp57Z7+ILm5k3XQiAbvrjr JKytntpIcUU9obpDAuQVgIK//TjcxisWZqHky/kfqIz2zJzWxgUKwq7cSRFctclOmtim IdaA== X-Gm-Message-State: AOJu0Yy+2X6NKDS/rR5HeeQSLDxNLCQUsIsT1X1l5/ukz+dUazOZCogQ DHQvsSt1XDjlqO+9U0N+xfWzlAGQpCo= X-Google-Smtp-Source: AGHT+IFUtVek5tgtWlacoPSjhiiuELWwNn7jJj9sbvKs86I/0MWelaR0mimo7Vzhfl3axOb6Ky338w== X-Received: by 2002:a5d:458f:0:b0:321:6ff5:9256 with SMTP id p15-20020a5d458f000000b003216ff59256mr1954408wrq.58.1696429101786; Wed, 04 Oct 2023 07:18:21 -0700 (PDT) Received: from thuna ([90.147.71.75]) by smtp.gmail.com with ESMTPSA id z17-20020a5d4d11000000b0032485046055sm4155178wrt.5.2023.10.04.07.18.21 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 07:18:21 -0700 (PDT) From: Thuna <thuna.cing@HIDDEN> Date: Wed, 04 Oct 2023 16:18:20 +0200 Message-ID: <87leci1nf7.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=thuna.cing@HIDDEN; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Currently, cl-generic-current-method-specializers expands into an alist of the form ((ARG . TYPE)...). The patch I provide quotes this so that it can serve as a proper sexp. Without quoting, this expansion is a bad sexp that, when evaluated, results in an error. If quoted, the form will simply not macroexpand, and any other method causes it to be evaluated after expanding. As it relies on the cl-defmethod's context, I see no obvious and/or convenient ways to use macroexpand to get the result unevaluated. A quick grep brought up no uses of this macro, so I feel that this change shouldn't effect many people, if any at all, although feel free to correct me if this is not the case. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Quote-cl-generic-current-method-specializers-inside-.patch Content-Description: The patch From a5b3065b8db59570cd98e8799c0ba0b0c46b9d6f Mon Sep 17 00:00:00 2001 From: Thuna <thuna.cing@HIDDEN> Date: Sun, 1 Oct 2023 21:15:29 +0200 Subject: [PATCH] Quote cl-generic-current-method-specializers inside method body * lisp/emacs-lisp/cl-generic.el (cl--generic-lambda): Quote spec-args when using cl-generic-current-method-specializers inside a method body. --- lisp/emacs-lisp/cl-generic.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index dec14bd5df6..a938195f097 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -393,7 +393,7 @@ cl-generic-define-context-rewriter (cl--generic-split-args args)) (fun `(cl-function (lambda ,plain-args ,@body))) (macroenv (cons `(cl-generic-current-method-specializers - . ,(lambda () spec-args)) + . ,(lambda () (list 'quote spec-args))) macroexpand-all-environment))) (require 'cl-lib) ;Needed to expand `cl-flet' and `cl-function'. (when (assq 'interactive body) -- 2.39.3 --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Thuna <thuna.cing@HIDDEN> Subject: bug#66342: Acknowledgement (Quote cl-generic-current-method-specializers) Message-ID: <handler.66342.B.16964291469801.ack <at> debbugs.gnu.org> References: <87leci1nf7.fsf@HIDDEN> X-Gnu-PR-Message: ack 66342 X-Gnu-PR-Package: emacs Reply-To: 66342 <at> debbugs.gnu.org Date: Wed, 04 Oct 2023 14:20:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 66342 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 66342: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D66342 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 5 Oct 2023 21:53:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 05 17:53:31 2023 Received: from localhost ([127.0.0.1]:48816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qoWHj-0003BF-B3 for submit <at> debbugs.gnu.org; Thu, 05 Oct 2023 17:53:31 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]:50247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1qoWHg-0003Ax-DN for control <at> debbugs.gnu.org; Thu, 05 Oct 2023 17:53:30 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2c16bc71e4cso17336451fa.0 for <control <at> debbugs.gnu.org>; Thu, 05 Oct 2023 14:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696542784; x=1697147584; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=yUDLFClPcMdPQancfpoOON4BIM8nwmcfVBW9Z9Urepw=; b=UkDUWrH0SNP90uKjuiC0hHPOe8OgsKDVoGSI4qK+JUHB+qbu4gTNALNHEM9bYiLiHN itvBeoORc2osf2+zqOprlwwl1tr2AT9Y02OEMwFQ5F07OniwSiVlyfY+5B4Cpg6a0gaD 4g5NMzUOMm6madXmRIORNeIanzgodYTdAU3JczblCQ4cvnSXkvQIKxEwBJE/2+xE3VSE pFwN48KqeYTffWNe9lLuBtTYALT400yOMNkAGPmMx8DXcZq6kUyUKp+xlo0aqmvUx2Hs twDt1J96//gfbwJzQ38odBs4PvRqMNnglc7pSgvyFlad/TPEsJp3OxqhvWwodJc9Z9L+ 2dfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696542784; x=1697147584; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=yUDLFClPcMdPQancfpoOON4BIM8nwmcfVBW9Z9Urepw=; b=wIGoxgdgezdu8/iz4kCoRdbumkoQVbS0n+PJb3IiUWXFWRre8LKZla+muA5jPtvU/5 B0OzdOUZQ27r4DJ/KzXlyuyw5omELmDDDPz14TxTUvYHH368ciW/ooRDNEyaXtoFPms0 Jpr4EEqbtVLgVsuWepGWZ0/dQav+P2jCiMmTXaVCB8EX40QDo9MwoloUwjtU9EyS/PJN tYr/NKlQRAeSAY+c3snZJ8lpj3AvJcQp+720qPGZiHnuG7dWEJx3godHucZ3ora4KlB7 drAWVO0DjDw7nUJ3hT5DWGEx8yswsiPS5n9vX/N9Vj6rMvxcNfmGRPGzuZEd8jCS6xkn a48Q== X-Gm-Message-State: AOJu0YzsCXGmXro7TjCgdeMOSs7xAiqZb/hl1nkPSxY9hxuBOj+FHGXG 9LPrafWTr0r/KQQzPEe9g2t2q1rYUHQqaPnQep809szZ X-Google-Smtp-Source: AGHT+IEpqm/PbiXajooXJee/Q7EPsbvDKbFOos9CsalLJLDyFh94FWupJ9TxaO6CZFTCR6lmtlfFV2eXnGYXH3vWs7U= X-Received: by 2002:a2e:7d03:0:b0:2b9:f13b:6139 with SMTP id y3-20020a2e7d03000000b002b9f13b6139mr6287921ljc.20.1696542784051; Thu, 05 Oct 2023 14:53:04 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 5 Oct 2023 21:53:03 +0000 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Thu, 5 Oct 2023 21:53:03 +0000 Message-ID: <CADwFkmkuLKpEQ1y6+QvkF2hPosC4wGq2+tDbUaG-DY8LbrWrnw@HIDDEN> Subject: control message for bug #66342 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) tags 66342 + patch quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.