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

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

[elpa] master e92d282 195/272: Make ivy-ignore-buffers similar to ido-ig


From: Oleh Krehel
Subject: [elpa] master e92d282 195/272: Make ivy-ignore-buffers similar to ido-ignore-buffers.
Date: Mon, 25 Apr 2016 10:13:25 +0000

branch: master
commit e92d28237ccd55659dc643cfd4c9cef107ce8e41
Author: Constantin Kulikov <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Make ivy-ignore-buffers similar to ido-ignore-buffers.
    
    Fixes #382
---
 ivy.el |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/ivy.el b/ivy.el
index a9738dc..76a4f58 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2485,9 +2485,9 @@ CANDS is a list of strings."
       (setq ivy--virtual-buffers (nreverse virtual-buffers))
       (mapcar #'car ivy--virtual-buffers))))
 
-(defcustom ivy-ignore-buffers nil
-  "List of regexps matching buffer names to ignore."
-  :type '(repeat regexp))
+(defcustom ivy-ignore-buffers '("\\` ")
+  "List of regexps or functions matching buffer names to ignore."
+  :type '(repeat (choice regexp function)))
 
 (defun ivy--buffer-list (str &optional virtual)
   "Return the buffers that match STR.
@@ -2562,8 +2562,10 @@ Skip buffers that match `ivy-ignore-buffers'."
       (or (cl-remove-if
            (lambda (buf)
              (cl-find-if
-              (lambda (regexp)
-                (string-match regexp buf))
+              (lambda (f-or-r)
+                (if (functionp f-or-r)
+                    (funcall ff buf)
+                  (string-match-p f-or-r buf)))
               ivy-ignore-buffers))
            res)
           res))))



reply via email to

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