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

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

[elpa] master 94b6a83 26/31: Don't error on bad regex


From: Oleh Krehel
Subject: [elpa] master 94b6a83 26/31: Don't error on bad regex
Date: Fri, 01 May 2015 14:29:03 +0000

branch: master
commit 94b6a839177f15bbb84045ad027172b674e5c951
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Don't error on bad regex
    
    * ivy.el (ivy--filter): When on bad regex, just set the result to nil.
    
    Fixes #70
---
 ivy.el |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ivy.el b/ivy.el
index ffc1913..e0adecd 100644
--- a/ivy.el
+++ b/ivy.el
@@ -890,12 +890,13 @@ CANDIDATES are assumed to be static."
                              (res candidates))
                          (dolist (re re-list)
                            (setq res
-                                 (funcall
-                                  (if (cdr re)
-                                      #'cl-remove-if-not
-                                    #'cl-remove-if)
-                                  `(lambda (x) (string-match ,(car re) x))
-                                  res)))
+                                 (ignore-errors
+                                   (funcall
+                                    (if (cdr re)
+                                        #'cl-remove-if-not
+                                      #'cl-remove-if)
+                                    `(lambda (x) (string-match ,(car re) x))
+                                    res))))
                          res))))
          (tail (nthcdr ivy--index ivy--old-cands))
          idx)



reply via email to

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