diff options
| author | Glenn Morris | 2008-09-20 19:47:07 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-09-20 19:47:07 +0000 |
| commit | 926558fb3b7c5fe6b4c116e9e1baa4281af75f21 (patch) | |
| tree | 97a21862d66260311cfb2f03812c516b61c94e2f | |
| parent | d44004c0541ee1f42a1998d5330abaa010d47b2a (diff) | |
| download | emacs-926558fb3b7c5fe6b4c116e9e1baa4281af75f21.tar.gz emacs-926558fb3b7c5fe6b4c116e9e1baa4281af75f21.zip | |
Ami Fischman <ami at fischman.org>
(savehist-save): Handle errors in writing as well as reading.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/savehist.el | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7dbfcd16c98..c32fadb767d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-09-20 Ami Fischman <ami@fischman.org> | ||
| 2 | |||
| 3 | * savehist.el (savehist-save): Handle errors in writing as well as | ||
| 4 | reading. | ||
| 5 | |||
| 1 | 2008-09-20 Michael Olson <mwolson@gnu.org> | 6 | 2008-09-20 Michael Olson <mwolson@gnu.org> |
| 2 | 7 | ||
| 3 | * emacs-lisp/tq.el (tq-create): Disable undo in tq buffer in order | 8 | * emacs-lisp/tq.el (tq-create): Disable undo in tq buffer in order |
diff --git a/lisp/savehist.el b/lisp/savehist.el index c2674fd4f8e..65dc6d025c1 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, | |||
| 318 | (dolist (elt value) | 318 | (dolist (elt value) |
| 319 | (let ((start (point))) | 319 | (let ((start (point))) |
| 320 | (insert " ") | 320 | (insert " ") |
| 321 | (prin1 elt (current-buffer)) | 321 | ;; Print and try to read the element we just printed. |
| 322 | ;; Try to read the element we just printed. | ||
| 323 | (condition-case nil | 322 | (condition-case nil |
| 324 | (save-excursion | 323 | (progn |
| 325 | (goto-char start) | 324 | (prin1 elt (current-buffer)) |
| 326 | (read (current-buffer))) | 325 | (save-excursion |
| 326 | (goto-char start) | ||
| 327 | (read (current-buffer)))) | ||
| 327 | (error | 328 | (error |
| 328 | ;; If reading it gets an error, comment it out. | 329 | ;; If reading it gets an error, comment it out. |
| 329 | (goto-char start) | 330 | (goto-char start) |