]> git.eshelyaron.com Git - emacs.git/commitdiff
(type-break-get-previous-time): Handle end-of-file errors specially
authorRichard M. Stallman <rms@gnu.org>
Sun, 4 Mar 2007 17:50:46 +0000 (17:50 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 4 Mar 2007 17:50:46 +0000 (17:50 +0000)
so they don't get reported wrong in .emacs.

lisp/type-break.el

index 361670dbe6c66e8c5fd0b195bce00bb4dc6831ed..e915ab2d1fb67f13dcb54ec9324bd150ba18b64b 100644 (file)
@@ -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'.