diff options
author | Glenn Morris <rgm@gnu.org> | 2011-03-04 00:14:57 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-03-04 00:14:57 -0800 |
commit | 732795fa270b62ad28e84d492557186dc24f0503 (patch) | |
tree | c4f8db5f93caa7e6e78b5c2506bd28d68e61499b /lisp/recentf.el | |
parent | 0a5cb52bb4ebe7dd23f3f2e8a30ca846afd353e0 (diff) | |
download | emacs-732795fa270b62ad28e84d492557186dc24f0503.tar.gz emacs-732795fa270b62ad28e84d492557186dc24f0503.tar.bz2 emacs-732795fa270b62ad28e84d492557186dc24f0503.zip |
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.
Diffstat (limited to 'lisp/recentf.el')
-rw-r--r-- | lisp/recentf.el | 15 |
1 files changed, 8 insertions, 7 deletions
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)) |