# HG changeset patch # User Richard M. Stallman # Date 1173030646 0 # Node ID 35a8988b02f798a38dd2c8a185f9cf64d286c107 # Parent ac1ac99d34549b0b3ead35e8b95256f265532427 (type-break-get-previous-time): Handle end-of-file errors specially so they don't get reported wrong in .emacs. diff -r ac1ac99d3454 -r 35a8988b02f7 lisp/type-break.el --- 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'.