;;; recentf.el --- setup a menu of recently opened files
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Created: July 19 1999
(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))
(recentf-auto-cleanup)
(let ((hook-setup (if recentf-mode 'add-hook 'remove-hook)))
(dolist (hook recentf-used-hooks)
- (apply hook-setup hook)))
- (run-hooks 'recentf-mode-hook)
- (when (called-interactively-p 'interactive)
- (message "Recentf mode %sabled" (if recentf-mode "en" "dis"))))
- recentf-mode)
+ (apply hook-setup hook)))))
(defun recentf-unload-function ()
"Unload the recentf library."
(run-hooks 'recentf-load-hook)
\f
-;; arch-tag: 78f1eec9-0d16-4d19-a4eb-2e4529edb62a
;;; recentf.el ends here