From 71ceaf98bfba0a9e697b4fa7ae3cb51e108afadb Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 13 Jun 2022 00:45:52 +0530 Subject: Implement infix translations. * thogai.el (thogai-insert-translation): Implement infix translations. --- thogai.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thogai.el b/thogai.el index 60f25ef..195c914 100644 --- a/thogai.el +++ b/thogai.el @@ -233,6 +233,13 @@ callers should never pass non-nil SUBTRANSLATION." ;; Attach operator ("{^}" (setq thogai-attach-next t)) + ;; Infix + ((pred (lambda (str) + (and (string-prefix-p "{^" str) + (string-suffix-p "^}" str)))) + (thogai-insert-literal + (string-remove-prefix "{^" (string-remove-suffix "^}" translation))) + (setq thogai-attach-next t)) ;; Prefix ((pred (lambda (str) (string-suffix-p "^}" str))) -- cgit v1.2.3