# HG changeset patch # User Noah Friedman # Date 774579176 0 # Node ID e41f372e0ea3ab456374532a3312c9b5b0ac273e # Parent 2c26fd09c101673e01a8ff3d38ae1e8fb5fcfcf5 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. diff -r 2c26fd09c101 -r e41f372e0ea3 lisp/type-break.el --- 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")