Mercurial > emacs
changeset 55012:13ef2f084366
(recentf-save-list): Catch and warn about errors.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 20 Apr 2004 20:54:53 +0000 |
parents | ebcf4edbc7f0 |
children | aba8cece2157 |
files | lisp/recentf.el |
diffstat | 1 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/recentf.el Tue Apr 20 20:54:00 2004 +0000 +++ b/lisp/recentf.el Tue Apr 20 20:54:53 2004 +0000 @@ -1137,13 +1137,16 @@ "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.