changeset 76297:35a8988b02f7

(type-break-get-previous-time): Handle end-of-file errors specially so they don't get reported wrong in .emacs.
author Richard M. Stallman <rms@gnu.org>
date Sun, 04 Mar 2007 17:50:46 +0000
parents ac1ac99d3454
children 872a30c0f872
files lisp/type-break.el
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/type-break.el	Sun Mar 04 17:49:56 2007 +0000
+++ b/lisp/type-break.el	Sun Mar 04 17:50:46 2007 +0000
@@ -562,9 +562,12 @@
     (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'.