From: Glenn Morris Date: Fri, 4 Mar 2011 08:14:57 +0000 (-0800) Subject: recentf.el fix for bug#5843. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~674^2~45 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=732795fa270b62ad28e84d492557186dc24f0503;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b4cf73b453..e506705e6e4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-04 Glenn Morris + + * 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 * calc/calc-units.el (math-to-standard-rec): Don't treat subscripted 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))