diff options
-rw-r--r-- | thogai.el | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -333,13 +333,14 @@ STROKES is injected first." ;; Inject strokes one by one. (dolist (stroke strokes) (ring-insert stroke-ring stroke) - (thogai-insert-stroke stroke-ring)))) + (thogai-process-stroke stroke-ring)))) -(defun thogai-insert-stroke (stroke-ring) - "Translate the most recent stroke and insert it at point. +(defun thogai-process-stroke (stroke-ring) + "Process the most recent stroke. -STROKE-RING is the ring representing the current state, and -should typically be `thogai-stroke-ring'." +Process the most recent stroke, and insert its translation or +execute a command. STROKE-RING is the ring representing the +current state, and should typically be `thogai-stroke-ring'." (if (string= (ring-ref stroke-ring 0) "*") ;; Special case to handle the undo operation (progn @@ -467,7 +468,7 @@ BYTES is a list of 6 bytes in the Gemini protocol." (insert "\n")) ;; Insert into stroke ring, and process translation. (ring-insert thogai-stroke-ring stroke) - (thogai-insert-stroke thogai-stroke-ring)) + (thogai-process-stroke thogai-stroke-ring)) (setq bytes nil)))))) (defun thogai-connect (port speed) |