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

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

[elpa] master 49131dc: use uninterned symbol in `el-search--matcher'


From: Michael Heerdegen
Subject: [elpa] master 49131dc: use uninterned symbol in `el-search--matcher'
Date: Fri, 12 Feb 2016 20:42:41 +0000

branch: master
commit 49131dcbf1f535f02085750795daddd32ecee166
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    use uninterned symbol in `el-search--matcher'
---
 packages/el-search/el-search.el |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 2f69f5f..57e4505 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -374,14 +374,15 @@ of the definitions is limited to \"el-search\"."
 
 (defun el-search--matcher (pattern &rest body)
   (eval ;use `eval' to allow for user defined pattern types at run time
-   `(el-search--with-additional-pcase-macros
-     (let ((byte-compile-debug t) ;make undefined pattern types raise an error
-           (warning-suppress-log-types '((bytecomp)))
-           (pcase--dontwarn-upats (cons '_ pcase--dontwarn-upats)))
-       (byte-compile (lambda (expression)
-                       (pcase expression
-                         (,pattern ,@(or body (list t)))
-                         (_        nil))))))))
+   (let ((expression (make-symbol "expression")))
+     `(el-search--with-additional-pcase-macros
+       (let ((byte-compile-debug t) ;make undefined pattern types raise an 
error
+             (warning-suppress-log-types '((bytecomp)))
+             (pcase--dontwarn-upats (cons '_ pcase--dontwarn-upats)))
+         (byte-compile (lambda (,expression)
+                         (pcase ,expression
+                           (,pattern ,@(or body (list t)))
+                           (_        nil)))))))))
 
 (defun el-search--match-p (matcher expression)
   (funcall matcher expression))



reply via email to

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