diff options
| author | Lars Ingebrigtsen | 2021-01-21 18:10:16 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-01-21 18:10:21 +0100 |
| commit | 2cf347a0a87bf490391a26fc26b29ca40a0fda93 (patch) | |
| tree | 41f0d46a4dabe8bf1ebf32c13ac385abfaafb2a8 | |
| parent | a6f030fc7bb3eae2a93dc4d944b6d7d313bd0bce (diff) | |
| download | emacs-2cf347a0a87bf490391a26fc26b29ca40a0fda93.tar.gz emacs-2cf347a0a87bf490391a26fc26b29ca40a0fda93.zip | |
Don't have type-break-mode signal errors on corrupted files
* lisp/type-break.el (type-break-get-previous-time):
(type-break-get-previous-count): Signal a warning instead of an
error (bug#38246). type-break will still continue to work even if
the database can't be loaded after a restart, but this allows
Emacs to be started.
| -rw-r--r-- | lisp/type-break.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/type-break.el b/lisp/type-break.el index 84c240c9f8c..a6d5cd01702 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el | |||
| @@ -487,7 +487,7 @@ Return nil if the file is missing or if the time is not a Lisp time value." | |||
| 487 | (goto-char (point-min)) | 487 | (goto-char (point-min)) |
| 488 | (read (current-buffer))) | 488 | (read (current-buffer))) |
| 489 | (end-of-file | 489 | (end-of-file |
| 490 | (error "End of file in `%s'" file)))))))) | 490 | (warn "End of file in `%s'" file)))))))) |
| 491 | 491 | ||
| 492 | (defun type-break-get-previous-count () | 492 | (defun type-break-get-previous-count () |
| 493 | "Get previous keystroke count from `type-break-file-name'. | 493 | "Get previous keystroke count from `type-break-file-name'. |
| @@ -505,7 +505,7 @@ integer." | |||
| 505 | (forward-line 1) | 505 | (forward-line 1) |
| 506 | (read (current-buffer))) | 506 | (read (current-buffer))) |
| 507 | (end-of-file | 507 | (end-of-file |
| 508 | (error "End of file in `%s'" file))))))) | 508 | (warn "End of file in `%s'" file))))))) |
| 509 | file | 509 | file |
| 510 | 0))) | 510 | 0))) |
| 511 | 511 | ||