diff options
author | Arun Isaac | 2022-06-13 23:58:02 +0530 |
---|---|---|
committer | Arun Isaac | 2022-06-14 00:04:26 +0530 |
commit | d279dcd6d3cf0e08c99a9a0e2ba3dd70b252b0bf (patch) | |
tree | 425719946c17a97830892e2c218a1e4b7df8d97f | |
parent | 14b7417609c90e89fc32c5fbeabc086ec3094e04 (diff) | |
download | thogai-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.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) |