From: Glenn Morris Date: Sun, 8 Sep 2013 23:15:17 +0000 (-0700) Subject: * lisp/saveplace.el (load-save-place-alist-from-file): Demote errors. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1662^2~74 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=144e38fe1809f1fcf96ce04b5abdfbca585e5251;p=emacs.git * lisp/saveplace.el (load-save-place-alist-from-file): Demote errors. Fixes: debbugs:15305 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 40a36719a1a..a7cb40fee60 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-09-08 Glenn Morris + + * saveplace.el (load-save-place-alist-from-file): + Demote errors. (Bug#15305) + 2013-09-08 Michael Albinus Improve compatibility with older Emacsen, and XEmacs. diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 2ddac6d6c43..e9dc12b00fe 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -255,8 +255,13 @@ may have changed\) back to `save-place-alist'." (insert-file-contents file) (goto-char (point-min)) (setq save-place-alist - (car (read-from-string - (buffer-substring (point-min) (point-max))))) + ;; This is with-demoted-errors, but we want to + ;; mention save-place in any error message. + (condition-case err + (car (read-from-string + (buffer-substring (point-min) (point-max)))) + (error (message "Error reading save-place-file: %S" err) + nil))) ;; If there is a limit, and we're over it, then we'll ;; have to truncate the end of the list: