branch: master commit 28028d80db3bed25625eb89cbc6749c9171d6556 Author: Michael Heerdegen <michael_heerde...@web.de> Commit: Michael Heerdegen <michael_heerde...@web.de>
Fix replacing matches with nil Replacing PATTERN -> nil replaced with t instead. This commit fixes this. --- packages/el-search/el-search.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el index 1298e32..ffe8eda 100644 --- a/packages/el-search/el-search.el +++ b/packages/el-search/el-search.el @@ -811,7 +811,7 @@ N times." "Like `pcase--macroexpand' but also expanding \"el-search\" patterns." (eval `(el-search--with-additional-pcase-macros (pcase--macroexpand ',pattern)))) -(defun el-search--matcher (pattern &optional result) +(cl-defun el-search--matcher (pattern &optional (result nil result-specified)) (eval ;use `eval' to allow for user defined pattern types at run time (let ((expression (make-symbol "expression"))) `(el-search--with-additional-pcase-macros @@ -820,7 +820,7 @@ N times." (pcase--dontwarn-upats (cons '_ pcase--dontwarn-upats))) (byte-compile (lambda (,expression) (pcase ,expression - (,pattern ,(or result t)) + (,pattern ,(if result-specified result t)) (_ nil))))))))) (defun el-search--match-p (matcher expression)