about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2022-06-16 00:36:42 +0530
committerArun Isaac2022-06-16 00:43:20 +0530
commitdaa980d1e2becc6907998290503cc768f6aa8fcc (patch)
treed633bd6e8b0ff08883211c6cafdfc1b92359c36e
parent1eff5affa52a750a1f2f5382353659382b0c6695 (diff)
downloadthogai-daa980d1e2becc6907998290503cc768f6aa8fcc.tar.gz
thogai-daa980d1e2becc6907998290503cc768f6aa8fcc.tar.lz
thogai-daa980d1e2becc6907998290503cc768f6aa8fcc.zip
Implement the glue operator in terms of the attach operator.
* thogai.el (thogai-insert-translation): Implement glue operator in
terms of the attach operator.
-rw-r--r--thogai.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/thogai.el b/thogai.el
index a893c80..44c1716 100644
--- a/thogai.el
+++ b/thogai.el
@@ -263,10 +263,10 @@ External callers should always pass nil as the value."
        ((pred (lambda (str)
                 (and (string-prefix-p "{&" str)
                      (string-suffix-p "}" str))))
-        (unless (or non-first-part-p thogai-glue)
-          (thogai-insert-space))
-        (thogai-insert-literal
-         (string-remove-prefix "{&" (string-remove-suffix "}" translation)))
+        (thogai-insert-translation
+         (concat (if thogai-glue "{^}" "")
+                 (string-remove-prefix "{&" (string-remove-suffix "}" translation)))
+         non-first-part-p)
         (setq thogai-glue t))
        ;; Period, question mark or exclamation mark
        ((or "{.}" "{?}" "{!}")