(define-key km (kbd "<right>") 'spray-forward-word)
(define-key km (kbd "f") 'spray-faster)
(define-key km (kbd "s") 'spray-slower)
+ (define-key km (kbd "t") 'spray-time)
(define-key km (kbd "q") 'spray-quit)
(define-key km (kbd "<return>") 'spray-quit)
(define-key km [remap forward-char] 'spray-forward-word)
(when was-running
(spray-start))))
+(defun spray-time ()
+ (interactive)
+ (widen)
+ (let ((position (progn (skip-chars-backward "^\s\t\n—") (point))))
+ (message
+ "%d per cent done; ~%d minute(s) remaining"
+ (* 100 (/ position (+ 0.0 (point-max))))
+ (fround (/ (count-words-region position (point-max)) (+ 0.0 spray-wpm)))))
+ (spray--word-at-point))
+
;; * provide
(provide 'spray)