Mercurial > emacs
changeset 98255:9bbf41625624
Ami Fischman <ami at fischman.org>
(savehist-save): Handle errors in writing as well as reading.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 20 Sep 2008 19:46:55 +0000 |
parents | 972e922aef7e |
children | e60018e33179 |
files | lisp/savehist.el |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/savehist.el Sat Sep 20 13:06:43 2008 +0000 +++ b/lisp/savehist.el Sat Sep 20 19:46:55 2008 +0000 @@ -318,12 +318,13 @@ (dolist (elt value) (let ((start (point))) (insert " ") - (prin1 elt (current-buffer)) - ;; Try to read the element we just printed. + ;; Print and try to read the element we just printed. (condition-case nil - (save-excursion - (goto-char start) - (read (current-buffer))) + (progn + (prin1 elt (current-buffer)) + (save-excursion + (goto-char start) + (read (current-buffer)))) (error ;; If reading it gets an error, comment it out. (goto-char start)