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

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

[elpa] master 1e85298 3/7: el-search: new pattern type `not'


From: Michael Heerdegen
Subject: [elpa] master 1e85298 3/7: el-search: new pattern type `not'
Date: Thu, 31 Dec 2015 21:43:07 +0000

branch: master
commit 1e8529872618cc0bae0497543588202ef076ab58
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    el-search: new pattern type `not'
---
 packages/el-search/el-search.el |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 6e81c28..8724071 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -569,6 +569,11 @@ matches the list (1 2 3 4 5 6 7 8 9) and binds `x' to (4 5 
6)."
   `(and (pred symbolp)
         (app symbol-name (string ,@regexps))))
 
+(el-search-defpattern not (pattern)
+  "Matches any object that is not matched by PATTERN."
+  `(app ,(apply-partially #'el-search--match-p (el-search--matcher pattern))
+        (pred not)))
+
 (defun el-search--match-symbol-file (regexp symbol)
   (when-let ((symbol-file (and (symbolp symbol)
                                (symbol-file symbol))))



reply via email to

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