255 |
If it returns nil, the filename is left unchanged." |
If it returns nil, the filename is left unchanged." |
256 |
:group 'recentf |
:group 'recentf |
257 |
:type 'function) |
:type 'function) |
258 |
|
|
259 |
|
(defcustom recentf-cleanup-remote t |
260 |
|
"*non-nil means to auto cleanup remote files." |
261 |
|
:group 'recentf |
262 |
|
:type 'boolean) |
263 |
|
|
264 |
;;; Utilities |
;;; Utilities |
265 |
;; |
;; |
1174 |
(message "Cleaning up the recentf list...") |
(message "Cleaning up the recentf list...") |
1175 |
(let (newlist) |
(let (newlist) |
1176 |
(dolist (f recentf-list) |
(dolist (f recentf-list) |
1177 |
(if (and (recentf-include-p f) (recentf-file-readable-p f)) |
(if (and (recentf-include-p f) |
1178 |
|
(or (and (file-remote-p f) |
1179 |
|
(not recentf-cleanup-remote)) |
1180 |
|
(recentf-file-readable-p f))) |
1181 |
(push f newlist) |
(push f newlist) |
1182 |
(message "File %s removed from the recentf list" f))) |
(message "File %s removed from the recentf list" f))) |
1183 |
(setq recentf-list (nreverse newlist)) |
(setq recentf-list (nreverse newlist)) |