From 068f123a5fa3e72162b58b954658ba531f940dad Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Mar 2005 14:10:46 +0000 Subject: [PATCH] (recentf-cleanup-remote): New variable. (recentf-cleanup): Use it to conditionally check availablity of remote files. --- lisp/ChangeLog | 6 ++++++ lisp/recentf.el | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f54f15b3e74..fd58d4e59d9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-03-19 Michael R. Mauger + + * recentf.el (recentf-cleanup-remote): New variable. + (recentf-cleanup): Use it to conditionally check availablity of + remote files. + 2005-03-19 Joe Edmonds (tiny change) * emacs-lisp/lisp-mode.el (lisp-mode-variables): Recognize `@' in diff --git a/lisp/recentf.el b/lisp/recentf.el index 169fee99529..a6f3cf0bff7 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -255,6 +255,11 @@ It is passed a filename to give a chance to transform it. If it returns nil, the filename is left unchanged." :group 'recentf :type 'function) + +(defcustom recentf-cleanup-remote t + "*non-nil means to auto cleanup remote files." + :group 'recentf + :type 'boolean) ;;; Utilities ;; @@ -1169,7 +1174,10 @@ empty `file-name-history' with the recent list." (message "Cleaning up the recentf list...") (let (newlist) (dolist (f recentf-list) - (if (and (recentf-include-p f) (recentf-file-readable-p f)) + (if (and (recentf-include-p f) + (or (and (file-remote-p f) + (not recentf-cleanup-remote)) + (recentf-file-readable-p f))) (push f newlist) (message "File %s removed from the recentf list" f))) (setq recentf-list (nreverse newlist))