From: Michael Heerdegen Date: Fri, 12 Feb 2016 20:39:04 +0000 (+0100) Subject: use uninterned symbol in `el-search--matcher' X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/49131dcbf1f535f02085750795daddd32ecee166 use uninterned symbol in `el-search--matcher' --- diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el index 2f69f5f87..57e450519 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))