- =spray-forward-word= (l, <right>) ::
inverse of =spray-backward-word=
+- =spray-faster= (f) ::
+ increases speed
+
+- =spray-slower= (s) ::
+ decreases speed
+
Press any key else to quit =spray-mode=.
** Customization
(define-key km (kbd "l") 'spray-forward-word)
(define-key km (kbd "<left>") 'spray-backward-word)
(define-key km (kbd "<right>") 'spray-forward-word)
+ (define-key km (kbd "f") 'spray-faster)
+ (define-key km (kbd "s") 'spray-slower)
km)
"keymap for spray-mode buffers")
(skip-chars-backward "\s\t\n")
(spray--word-at-point))
+(defun spray-faster ()
+ "Increases speed.
+
+Increases the wpm (words per minute) parameter. See the variable
+`spray-wmp'."
+ (interactive)
+ (spray-inc-wpm 20))
+
+(defun spray-slower ()
+ "Decreases speed.
+
+Decreases the wpm (words per minute) parameter. See the variable
+`spray-wmp'."
+ (interactive)
+ (spray-inc-wpm -20))
+
+(defun spray-inc-wpm (delta)
+ (let ((was-running spray--running))
+ (spray-start/stop -1)
+ (when (< 10 (+ spray-wpm delta))
+ (setq spray-wpm (+ spray-wpm delta)))
+ (spray-backward-word)
+ (message "spray wpm: %d" spray-wpm)
+ (when was-running
+ (spray-start/stop 1))))
+
;; * provide
(provide 'spray)