aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-06-13 23:58:02 +0530
committerArun Isaac2022-06-14 00:04:26 +0530
commitd279dcd6d3cf0e08c99a9a0e2ba3dd70b252b0bf (patch)
tree425719946c17a97830892e2c218a1e4b7df8d97f
parent14b7417609c90e89fc32c5fbeabc086ec3094e04 (diff)
downloadthogai-d279dcd6d3cf0e08c99a9a0e2ba3dd70b252b0bf.tar.gz
thogai-d279dcd6d3cf0e08c99a9a0e2ba3dd70b252b0bf.tar.lz
thogai-d279dcd6d3cf0e08c99a9a0e2ba3dd70b252b0bf.zip
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.
-rw-r--r--thogai.el13
1 files 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)