branch: elpa/gnosis
commit e68f7c5b9f892da827bde547fcfa521e089975e7
Author: Thanos Apollo <[email protected]>
Commit: Thanos Apollo <[email protected]>

    Rename monkeytype--handle-change to monkeytype--handler.
    
    + Disable debugging messages.
---
 gnosis-monkeytype.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnosis-monkeytype.el b/gnosis-monkeytype.el
index 8be80f9f8f8..29e775f6144 100644
--- a/gnosis-monkeytype.el
+++ b/gnosis-monkeytype.el
@@ -71,14 +71,15 @@
     (delete-trailing-whitespace)
     (buffer-string)))
 
-(defun gnosis-monkeytype--handle-change (_beg end _len)
+(defun gnosis-monkeytype--handler (_beg end _len)
   "Handler buffer change at END."
   (when (and (eq (current-buffer) (get-buffer gnosis-monkeytype-buffer-name))
             (eq this-command 'self-insert-command))
     (let ((correct-char (char-after end))
           (typed-char (char-before end)))
-      (when (and correct-char typed-char)
-       (message "Comparing: %c with %c POS: %d" typed-char correct-char end))
+      ;; Debugging ;;
+      ;; (when (and correct-char typed-char)
+      ;;       (message "Comparing: %c with %c POS: %d" typed-char 
correct-char end))
       (if (and correct-char typed-char (char-equal correct-char typed-char))
           (progn
             (delete-char -1)
@@ -128,7 +129,7 @@ Optionally, highlight MISTAKES."
        (fill-paragraph)
        (switch-to-buffer (get-buffer-create gnosis-monkeytype-buffer-name))
        (goto-char (point-min))
-       (add-hook 'after-change-functions #'gnosis-monkeytype--handle-change)
+       (add-hook 'after-change-functions #'gnosis-monkeytype--handler)
        (recursive-edit)
        (setq gnosis-monkeytype-wpm-result
              (gnosis-monkeytype--calculate-wpm text-formatted start-time))))))

Reply via email to