]> git.eshelyaron.com Git - emacs.git/commitdiff
recentf.el fix for bug#5843.
authorGlenn Morris <rgm@gnu.org>
Fri, 4 Mar 2011 08:14:57 +0000 (00:14 -0800)
committerGlenn Morris <rgm@gnu.org>
Fri, 4 Mar 2011 08:14:57 +0000 (00:14 -0800)
* lisp/recentf.el (recentf-include-p): In case of a buggy predicate,
err on the side of including, not excluding.

lisp/ChangeLog
lisp/recentf.el

index 9b4cf73b453114ae298e1fe8b6ecf2f90c6e6e99..e506705e6e4bb11a434857cc1c180dc3f2ae5a18 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-04  Glenn Morris  <rgm@gnu.org>
+
+       * recentf.el (recentf-include-p): In case of a buggy predicate,
+       err on the side of including, not excluding.  (Bug#5843)
+
 2011-03-04  Jay Belanger  <jay.p.belanger@gmail.com>
 
        * calc/calc-units.el (math-to-standard-rec): Don't treat subscripted
index d0be69b51fc9d30fc8a2c218fc241d482ff3c7a5..9f9baad8dbdce7802cdcb986966cdbfc7e76ddb1 100644 (file)
@@ -411,13 +411,14 @@ That is, if it doesn't match any of the `recentf-exclude' checks."
         (checks recentf-exclude)
         (keepit t))
     (while (and checks keepit)
-      (setq keepit (condition-case nil
-                       (not (if (stringp (car checks))
-                                ;; A regexp
-                                (string-match (car checks) filename)
-                              ;; A predicate
-                              (funcall (car checks) filename)))
-                     (error nil))
+      ;; If there was an error in a predicate, err on the side of
+      ;; keeping the file.  (Bug#5843)
+      (setq keepit (not (ignore-errors
+                          (if (stringp (car checks))
+                              ;; A regexp
+                              (string-match (car checks) filename)
+                            ;; A predicate
+                            (funcall (car checks) filename))))
             checks (cdr checks)))
     keepit))