Function: save-place-forget-unreadable-files
save-place-forget-unreadable-files is an interactive and byte-compiled
function defined in saveplace.el.gz.
Signature
(save-place-forget-unreadable-files)
Documentation
Remove unreadable files from save-place-alist.
For each entry in the alist, if file-readable-p returns nil for the
filename, remove the entry. Save the new alist (as the first pair
may have changed) back to save-place-alist.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/saveplace.el.gz
(defun save-place-forget-unreadable-files ()
"Remove unreadable files from `save-place-alist'.
For each entry in the alist, if `file-readable-p' returns nil for the
filename, remove the entry. Save the new alist (as the first pair
may have changed) back to `save-place-alist'."
(interactive)
;; the following was adapted from an in-place filtering function,
;; `filter-mod', used in the original.
(unless (null save-place-alist) ;says it better than `when'
;; first, check all except first
(let ((fmprev save-place-alist) (fmcur (cdr save-place-alist)))
(while fmcur ;not null
;; a value is only saved when it becomes FMPREV.
(if (if (string-match save-place-skip-check-regexp (caar fmcur))
save-place-save-skipped
(file-readable-p (caar fmcur)))
(setq fmprev fmcur)
(setcdr fmprev (cdr fmcur)))
(setq fmcur (cdr fmcur))))
;; test first pair, keep it if OK, otherwise 2nd element, which
;; may be '()
(unless (if (string-match save-place-skip-check-regexp
(caar save-place-alist))
save-place-save-skipped
(file-readable-p (caar save-place-alist)))
(setq save-place-alist (cdr save-place-alist)))))