summaryrefslogtreecommitdiff
path: root/lisp/type-break.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/type-break.el')
-rw-r--r--lisp/type-break.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/type-break.el b/lisp/type-break.el
index e915ab2d1fb..e065e32df54 100644
--- a/lisp/type-break.el
+++ b/lisp/type-break.el
@@ -579,10 +579,13 @@ integer."
(setq file
(with-current-buffer
(find-file-noselect file 'nowarn)
- (save-excursion
- (goto-char (point-min))
- (forward-line 1)
- (read (current-buffer)))))))
+ (condition-case nil
+ (save-excursion
+ (goto-char (point-min))
+ (forward-line 1)
+ (read (current-buffer)))
+ (end-of-file
+ (error "End of file in `%s'" file)))))))
file
0)))