aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-06-13 00:45:52 +0530
committerArun Isaac2022-06-13 00:45:52 +0530
commit71ceaf98bfba0a9e697b4fa7ae3cb51e108afadb (patch)
treebdd5638278a7a9207eafcdb5ca34f162ad714f68
parent8a8230e0604a20234a30d49b297dd8dd0c8c7cd1 (diff)
downloadthogai-71ceaf98bfba0a9e697b4fa7ae3cb51e108afadb.tar.gz
thogai-71ceaf98bfba0a9e697b4fa7ae3cb51e108afadb.tar.lz
thogai-71ceaf98bfba0a9e697b4fa7ae3cb51e108afadb.zip
Implement infix translations.
* thogai.el (thogai-insert-translation): Implement infix translations.
-rw-r--r--thogai.el7
1 files changed, 7 insertions, 0 deletions
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)))