From 732795fa270b62ad28e84d492557186dc24f0503 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 4 Mar 2011 00:14:57 -0800 Subject: recentf.el fix for bug#5843. * lisp/recentf.el (recentf-include-p): In case of a buggy predicate, err on the side of including, not excluding. --- lisp/recentf.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lisp/recentf.el') diff --git a/lisp/recentf.el b/lisp/recentf.el index d0be69b51fc..9f9baad8dbd 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -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)) -- cgit v1.2.1