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#72328: [PATCH] Nested backquote in pcase Date: Sun, 22 Sep 2024 09:30:25 -0400 Message-ID: References: <87jzh62vtr.fsf@gmail.com> <87mslumpsw.fsf@gmail.com> <86msluuox9.fsf@gnu.org> <875xshn3km.fsf@gmail.com> <87cymo6wp9.fsf@web.de> <87v80gkmg7.fsf@gmail.com> <86ikwfqj9w.fsf@gnu.org> <87a5hqzrxg.fsf@gmail.com> <86o765q4yo.fsf@gnu.org> <871q31ztju.fsf@gmail.com> <87bk2580rv.fsf@web.de> <87msloxmmv.fsf@gmail.com> <86jzgrmua0.fsf@gnu.org> <87v7zrncmw.fsf@web.de> <86plpzp6oc.fsf@gnu.org> <86ed6fox6h.fsf@gnu.org> <86o750ylrx.fsf@gnu.org> <877cbnhcsi.fsf@web.de> 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="32034"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , thuna.cing@gmail.com, 72328@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 22 15:32:00 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 1ssMgx-0008CC-Mg for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Sep 2024 15:32:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssMgg-00052z-SC; Sun, 22 Sep 2024 09:31:42 -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 1ssMge-00052W-UX for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2024 09:31:40 -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 1ssMge-0003au-ET for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2024 09:31:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=JoEdcZjbN2fBhrW/WcWTyIFFnyoxTSEuyEfJi1JxH4c=; b=pKXgMAAtixyoEOH/jtdF6YoDBQKGmoqv82AopPljiYts4KFwoL75chFKASlWULJ8HyNmkZuIX2cT6MBl6AdkqmQl6R+c5tkqV5nz5dYCfXbdXPY29VMrsj/4ecLwVjRCpJ/0ckNgXPyKIcfq/1nQzPb3HXAOzBAIpyoLVlt0PBZMwqlTCN7a1nTdC53Y0Gfgrd43VmCOd7ghnfNxgzf/PNoVcZSpTy8zA71ggCcslGGfOwLwX8TPi9/ngtoX5/b5ZV8BN+X90z9QRoVtzYzZF5zNOzhG8C2E2XHSuSDxuYCfWqcnGB++2XK06cs3iQxbMBR18UQJzq1Qxq7f0YZcuw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ssMgz-0002y1-NU for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2024 09:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2024 13:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72328 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72328-submit@debbugs.gnu.org id=B72328.172701186511316 (code B ref 72328); Sun, 22 Sep 2024 13:32:01 +0000 Original-Received: (at 72328) by debbugs.gnu.org; 22 Sep 2024 13:31:05 +0000 Original-Received: from localhost ([127.0.0.1]:41089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssMg4-0002wS-HD for submit@debbugs.gnu.org; Sun, 22 Sep 2024 09:31:04 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssMg2-0002w5-KQ for 72328@debbugs.gnu.org; Sun, 22 Sep 2024 09:31:03 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 40FA6100044; Sun, 22 Sep 2024 09:30:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1727011834; bh=Cow5Il2RJl6rmwxJHDvBkF9dyIrWZ//2OiIoJHKXxVk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=pT008DMOrlt3MNY7bQjDBj71INBrKO3wufaYqmR7UI9bexD9nbI+bD+N8ykAcxJ9W AJFR+YMaXO8G9lXEp45r9mNjELAGs/jD0yMTGXlIvEEajKt8GOuVVq2MGLEOAoqOVZ qEbaxAQS4KyP5Ic5gJ9L8XnpiwlWKMqkSJAyq7prpOV75oz+leX54+LRX2u1/f4KR3 Ihl7aB0tcHwuqck6sv2vgEYuhAzmYUExeoZWvfnNnNRKIQ6Qfdcv/kt6+Mw0UhNZk9 7iK4gZHswxf3OCpznAOoiBa5PoIfFYObFYaaAj1B14mp/GMXEkYk51mZ2t0+kRY7r5 +U1leDdhY327A== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 79106100035; Sun, 22 Sep 2024 09:30:34 -0400 (EDT) Original-Received: from pastel (unknown [45.72.221.103]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 47673120500; Sun, 22 Sep 2024 09:30:34 -0400 (EDT) In-Reply-To: <877cbnhcsi.fsf@web.de> (Michael Heerdegen's message of "Sat, 07 Sep 2024 14:24:29 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292233 Archived-At: >> Ping! Stefan, should I install this in your name? > In the meantime I installed the patch locally and got two warnings when > rebuilding Emacs completely: > | In testcover-analyze-coverage: > | emacs-lisp/testcover.el:472:8: Warning: Nested ` are not supported > | ELC emacs-lisp/timer-list.elc > | > | In testcover-analyze-coverage-wrapped-form: > | emacs-lisp/testcover.el:551:8: Warning: Nested ` are not supported > > But they should be trivial to fix (they are only warnings anyway). Indeed, these are cases which would change meaning under the semantics that was proposed in this bug report. The patch below would get rid of the nested backquotes, thus making that code "agnostic" to their semantics. Stefan diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index fb4a2a82d07..d916ca0f76a 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -469,7 +469,7 @@ testcover-analyze-coverage ;; form to look odd. See bug#25316. 'testcover-1value) - (`(\` ,bq-form) + (`(,'\` ,bq-form) (testcover-analyze-coverage-backquote-form bq-form)) ((or 't 'nil (pred keywordp)) @@ -548,7 +548,7 @@ testcover-analyze-coverage-wrapped-form 'testcover-1value)) ((pred atom) 'testcover-1value) - (`(\` ,bq-form) + (`(,'\` ,bq-form) (testcover-analyze-coverage-backquote-form bq-form)) (`(defconst ,sym ,val . ,_) (push sym testcover-module-constants)