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

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

[elpa] master 28028d8: Fix replacing matches with nil


From: Michael Heerdegen
Subject: [elpa] master 28028d8: Fix replacing matches with nil
Date: Sun, 22 Oct 2017 07:11:19 -0400 (EDT)

branch: master
commit 28028d80db3bed25625eb89cbc6749c9171d6556
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    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)



reply via email to

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