GNU bug report logs - #72328
[PATCH] Nested backquote in pcase

Previous Next

Package: emacs;

Reported by: Thuna <thuna.cing <at> gmail.com>

Date: Sun, 28 Jul 2024 01:06:02 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, thuna.cing <at> gmail.com, 72328 <at> debbugs.gnu.org
Subject: bug#72328: [PATCH] Nested backquote in pcase
Date: Sun, 22 Sep 2024 09:30:25 -0400
>> 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)





This bug report was last modified 293 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.