Subject: bug#72328: [PATCH] Nested backquote in pcase

From: Stefan Monnier <[email-masked]>
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)