From 1e8529872618cc0bae0497543588202ef076ab58 Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Wed, 30 Dec 2015 01:33:52 +0100 Subject: [PATCH] el-search: new pattern type `not' --- packages/el-search/el-search.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el index 6e81c2826..8724071ed 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)))) -- 2.39.2