X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=spray.el;h=bb0ea2c0d68677286b7e59c38b8a6c173b47fbe4;hb=aba52cd500adc7c0ff61fbd18a61968c9eccacc4;hp=7a6b8fd23c47b4253c94140919bf709f650089e2;hpb=0cb0ae4211111aabd624e77621a5758a36499e67;p=spray diff --git a/spray.el b/spray.el index 7a6b8fd..bb0ea2c 100644 --- a/spray.el +++ b/spray.el @@ -1,4 +1,4 @@ -;;; cedit.el --- a speed reading mode +;;; spray.el --- a speed reading mode ;; Copyright (C) 2014 zk_phi @@ -19,7 +19,7 @@ ;; Author: zk_phi ;; URL: http://hins11.yu-yake.com/ ;; Author: Ian Kelling -;; Version: 0.0.1 +;; Version: 0.0.2 ;;; Commentary: @@ -38,6 +38,7 @@ ;;; Change Log: ;; 0.0.0 test release ;; 0.0.1 add spray-set-margins +;; 0.0.2 margin options, speed control, better quit ;;; Code: @@ -71,8 +72,8 @@ :foreground (face-foreground 'default) :slant 'normal) -(make-face 'spray-orp-face) -(set-face-attribute 'spray-orp-face nil +(make-face 'spray-accent-face) +(set-face-attribute 'spray-accent-face nil :foreground "red" :overline (face-foreground 'default) :underline (face-foreground 'default) @@ -120,8 +121,7 @@ (overlay-put spray--base-overlay 'priority 100) (overlay-put spray--base-overlay 'face 'spray-base-face) (overlay-put spray--orp-overlay 'priority 101) - (overlay-put spray--orp-overlay 'face 'spray-orp-face) - (add-hook 'pre-command-hook 'spray--pre-command-handler) + (overlay-put spray--orp-overlay 'face 'spray-accent-face) (spray-start)) (t (setq cursor-type spray--saved-cursor-type) @@ -135,7 +135,6 @@ (buffer-face-mode 1))) (delete-overlay spray--base-overlay) (delete-overlay spray--orp-overlay) - (remove-hook 'pre-command-hook 'spray--pre-command-handler) (spray-stop)))) (defun spray-quit () @@ -143,10 +142,6 @@ (interactive) (spray-mode -1)) -(defun spray--pre-command-handler () - (unless (string-match "^spray-" (symbol-name this-command)) - (spray-mode -1))) - (defun spray--word-at-point () (skip-chars-backward "^\s\t\n") (let* ((beg (point))