aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-03-04 17:50:46 +0000
committerRichard M. Stallman2007-03-04 17:50:46 +0000
commitdad757bc24f51ab5d599bd5b25b05d1a8c80f082 (patch)
tree07032dc80918ac5e5e3b9f2bd7eab5912fee262b
parent514f940d63ac8bbb458846e08f417aa14c867543 (diff)
downloademacs-dad757bc24f51ab5d599bd5b25b05d1a8c80f082.tar.gz
emacs-dad757bc24f51ab5d599bd5b25b05d1a8c80f082.zip
(type-break-get-previous-time): Handle end-of-file errors specially
so they don't get reported wrong in .emacs.
-rw-r--r--lisp/type-break.el9
1 files changed, 6 insertions, 3 deletions
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
562 (if file 562 (if file
563 (timep ;; returns expected format, else nil 563 (timep ;; returns expected format, else nil
564 (with-current-buffer (find-file-noselect file 'nowarn) 564 (with-current-buffer (find-file-noselect file 'nowarn)
565 (save-excursion 565 (condition-case nil
566 (goto-char (point-min)) 566 (save-excursion
567 (read (current-buffer)))))))) 567 (goto-char (point-min))
568 (read (current-buffer)))
569 (end-of-file
570 (error "End of file in `%s'" file))))))))
568 571
569(defun type-break-get-previous-count () 572(defun type-break-get-previous-count ()
570 "Get previous keystroke count from `type-break-file-name'. 573 "Get previous keystroke count from `type-break-file-name'.