From d279dcd6d3cf0e08c99a9a0e2ba3dd70b252b0bf Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 13 Jun 2022 23:58:02 +0530 Subject: Rename thogai-insert-stroke to thogai-process-stroke. We don't always "insert" a stroke. So, this is a better name. * thogai.el (thogai-insert-stroke): Rename to thogai-process-stroke. (thogai-inject-strokes, thogai-gemini-protocol-filter): Update invocations of thogai-insert-stroke. --- thogai.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/thogai.el b/thogai.el index d64e3e5..241beaf 100644 --- a/thogai.el +++ b/thogai.el @@ -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) -- cgit v1.2.3