emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/el-search 92efda8 101/332: Add comment about (pcase) ba


From: Stefan Monnier
Subject: [elpa] externals/el-search 92efda8 101/332: Add comment about (pcase) backquote inside (real) backquote
Date: Tue, 1 Dec 2020 15:48:21 -0500 (EST)

branch: externals/el-search
commit 92efda81211e3239e77a816a61d29640abc20d09
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>

    Add comment about (pcase) backquote inside (real) backquote
---
 el-search.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/el-search.el b/el-search.el
index d79af7f..cfdf875 100644
--- a/el-search.el
+++ b/el-search.el
@@ -659,6 +659,19 @@ MESSAGE are used to construct the error message."
 
 ;;;; Additional pattern type definitions
 
+;; Hint: we sometimes need to create (pcase) backquote forms with
+;; backquote.  I do this like in this example:
+;;
+;; (let ((y 2))
+;;   `(,'\` ((,'\, x) ,y)))
+;;   ==> `(,x 2)
+;;
+;; Note that the backslashes are mandatory, else the reader macros are
+;; interpreted as composition of the respective operations, like in
+;;
+;; `(', (+ 1 2)) ==> ('3)
+
+
 (defun el-search--split (matcher1 matcher2 list)
   "Helper for the append pattern type.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]