From: Richard M. Stallman Date: Tue, 20 Apr 2004 20:54:53 +0000 (+0000) Subject: (recentf-save-list): Catch and warn about errors. X-Git-Tag: ttn-vms-21-2-B4~6712 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a0df7a328544a147e74011988cbdbe2d7930d27e;p=emacs.git (recentf-save-list): Catch and warn about errors. --- diff --git a/lisp/recentf.el b/lisp/recentf.el index 7e379822457..efe4ebc63a4 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -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.