aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2008-09-20 19:47:07 +0000
committerGlenn Morris <[email protected]>2008-09-20 19:47:07 +0000
commit926558fb3b7c5fe6b4c116e9e1baa4281af75f21 (patch)
tree97a21862d66260311cfb2f03812c516b61c94e2f
parentd44004c0541ee1f42a1998d5330abaa010d47b2a (diff)
Ami Fischman <ami at fischman.org>
(savehist-save): Handle errors in writing as well as reading.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/savehist.el11
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7dbfcd16c9..c32fadb767 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-20 Ami Fischman <[email protected]>
+
+ * savehist.el (savehist-save): Handle errors in writing as well as
+ reading.
+
2008-09-20 Michael Olson <[email protected]>
* emacs-lisp/tq.el (tq-create): Disable undo in tq buffer in order
diff --git a/lisp/savehist.el b/lisp/savehist.el
index c2674fd4f8..65dc6d025c 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -318,12 +318,13 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved,
(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)