diff options
author | Arun Isaac | 2022-06-13 00:39:19 +0530 |
---|---|---|
committer | Arun Isaac | 2022-06-13 00:39:19 +0530 |
commit | 58ca6663a851329645f1c1ed9e15104b006485a7 (patch) | |
tree | 490833ed17c0158f261164dc120c45f7d823ebb7 | |
parent | 53efbb6159560778e6ac33625c54081a0a09c4cd (diff) | |
download | thogai-58ca6663a851329645f1c1ed9e15104b006485a7.tar.gz thogai-58ca6663a851329645f1c1ed9e15104b006485a7.tar.lz thogai-58ca6663a851329645f1c1ed9e15104b006485a7.zip |
Reset attach and glue state when inserting literals.
* thogai.el (thogai-insert-literal): Reset thogai-attach-next and
thogai-glue.
(thogai-insert-translation): Depend on thogai-insert-literal to reset
thogai-attach-next and thogai-glue.
-rw-r--r-- | thogai.el | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -211,7 +211,10 @@ Insert LITERAL-TRANSLATION at point, respecting (concat (downcase (substring str 0 1)) (substring str 1))) 'identity)) - literal-translation))) + literal-translation)) + ;; Reset `thogai-attach-next' and `thogai-glue'. + (setq thogai-attach-next nil + thogai-glue nil)) (defun thogai-insert-translation (translation &optional subtranslation) "Insert TRANSLATION at point. @@ -270,9 +273,6 @@ callers should never pass non-nil SUBTRANSLATION." (_ (unless subtranslation (thogai-insert-space)) - ;; Reset `thogai-attach-next' and `thogai-glue'. - (setq thogai-attach-next nil - thogai-glue nil) (thogai-insert-literal translation))) ;; Recurse for rest of translation. (unless (string= rest-of-translation "") |