Commit a0df7a32 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(recentf-save-list): Catch and warn about errors.

parent d08fd12f
......@@ -1137,13 +1137,16 @@ default."
"Save the recent list.
Write data into the file specified by `recentf-save-file'."
(interactive)
(with-temp-buffer
(erase-buffer)
(insert (format recentf-save-file-header (current-time-string)))
(recentf-dump-variable 'recentf-list recentf-max-saved-items)
(recentf-dump-variable 'recentf-filter-changer-state)
(write-file (expand-file-name recentf-save-file))
nil))
(condition-case error
(with-temp-buffer
(erase-buffer)
(insert (format recentf-save-file-header (current-time-string)))
(recentf-dump-variable 'recentf-list recentf-max-saved-items)
(recentf-dump-variable 'recentf-filter-changer-state)
(write-file (expand-file-name recentf-save-file))
nil)
(error
(warn "recentf mode: %s" (error-message-string error)))))
(defun recentf-load-list ()
"Load a previously saved recent list.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment