diff options
author | Eli Zaretskii <eliz@gnu.org> | 2005-03-19 14:09:29 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2005-03-19 14:09:29 +0000 |
commit | 0c43ac85bcff1f27f5d5b8c131c770b3a83f294b (patch) | |
tree | 219e5cb6c680d621dadcc694f56bc01a091fb181 | |
parent | 831fac4d6dc638aed8ebf5e9aebaf8398ea60964 (diff) | |
download | emacs-0c43ac85bcff1f27f5d5b8c131c770b3a83f294b.tar.gz |
(recentf-cleanup-remote): New variable.
(recentf-cleanup): Use it to conditionally check availablity of
remote files.
-rw-r--r-- | lisp/recentf.el | 10 |
1 files changed, 9 insertions, 1 deletions
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)) |