1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-05 20:43:08 +00:00

(type-break-get-previous-time): Handle end-of-file errors specially

so they don't get reported wrong in .emacs.
This commit is contained in:
Richard M. Stallman 2007-03-04 17:50:46 +00:00
parent 514f940d63
commit dad757bc24

View 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'.