From daa980d1e2becc6907998290503cc768f6aa8fcc Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 16 Jun 2022 00:36:42 +0530 Subject: Implement the glue operator in terms of the attach operator. * thogai.el (thogai-insert-translation): Implement glue operator in terms of the attach operator. --- thogai.el | 8 ++++---- 1 file 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 "{.}" "{?}" "{!}") -- cgit v1.2.3