From: Richard M. Stallman Date: Sun, 4 Mar 2007 17:50:46 +0000 (+0000) Subject: (type-break-get-previous-time): Handle end-of-file errors specially X-Git-Tag: emacs-pretest-22.0.96~286 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dad757bc24f51ab5d599bd5b25b05d1a8c80f082;p=emacs.git (type-break-get-previous-time): Handle end-of-file errors specially so they don't get reported wrong in .emacs. --- diff --git a/lisp/type-break.el b/lisp/type-break.el index 361670dbe6c..e915ab2d1fb 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -562,9 +562,12 @@ Returns nil if the file is missing or if the time breaks with the (if file (timep ;; returns expected format, else nil (with-current-buffer (find-file-noselect file 'nowarn) - (save-excursion - (goto-char (point-min)) - (read (current-buffer)))))))) + (condition-case nil + (save-excursion + (goto-char (point-min)) + (read (current-buffer))) + (end-of-file + (error "End of file in `%s'" file)))))))) (defun type-break-get-previous-count () "Get previous keystroke count from `type-break-file-name'.