Mercurial > emacs
changeset 8281:e41f372e0ea3
type-break-check: Shrink keystroke count if it is less than min-threshold
chars from max-threshold, not more.
type-break-statistics: If time for scheduled break is less than a minute
away, show seconds instead.
author | Noah Friedman <friedman@splode.com> |
---|---|
date | Tue, 19 Jul 1994 00:52:56 +0000 |
parents | 2c26fd09c101 |
children | 206451cdd48a |
files | lisp/type-break.el |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/type-break.el Mon Jul 18 18:49:25 1994 +0000 +++ b/lisp/type-break.el Tue Jul 19 00:52:56 1994 +0000 @@ -342,7 +342,7 @@ ;; will reset the keystroke count anyway. (and max-threshold min-threshold - (> (- max-threshold type-break-keystroke-count) min-threshold) + (< (- max-threshold type-break-keystroke-count) min-threshold) (setq type-break-keystroke-count min-threshold)) (type-break-query)))) ((and max-threshold @@ -417,11 +417,15 @@ (current-time-string type-break-time-last-break) "never") (if (and type-break-mode type-break-time-next-break) - (format "%s\t(%d minutes from now)" + (format "%s\t(%s from now)" (current-time-string type-break-time-next-break) - (/ (type-break-time-difference - (current-time) type-break-time-next-break) - 60)) + (let* ((secs (type-break-time-difference + (current-time) + type-break-time-next-break)) + (mins (/ secs 60))) + (if (> mins 0) + (format "%d minutes" mins) + (format "%d seconds" secs)))) "none scheduled") (or (car type-break-keystroke-threshold) "none") (or (cdr type-break-keystroke-threshold) "none")