diff options
author | Arun Isaac | 2022-06-19 00:26:36 +0530 |
---|---|---|
committer | Arun Isaac | 2022-06-19 00:26:36 +0530 |
commit | 779594b51d25c7940ac99a59a6f1319e2ce749b7 (patch) | |
tree | a1325d59394904561bd3b208faa4c63de2202f6c | |
parent | 99e44f9de05ec8785eee4128de2c27ea91ecf133 (diff) | |
download | thogai-779594b51d25c7940ac99a59a6f1319e2ce749b7.tar.gz thogai-779594b51d25c7940ac99a59a6f1319e2ce749b7.tar.lz thogai-779594b51d25c7940ac99a59a6f1319e2ce749b7.zip |
Implement formatting cancellation operator.
* thogai.el (thogai-insert-translation): Implement formatting
cancellation operator.
-rw-r--r-- | thogai.el | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -298,7 +298,7 @@ have been processed yet. This is an internal recursion variable. External callers should always pass nil as the value." (pcase (save-match-data (string-match (rx string-start (or (one-or-more (not ?{)) - (sequence ?{ (one-or-more (not ?{)) ?}))) + (sequence ?{ (zero-or-more (not ?{)) ?}))) translation) (list (match-string 0 translation) (substring translation (match-end 0)))) @@ -349,6 +349,12 @@ External callers should always pass nil as the value." (string-remove-prefix "{&" (string-remove-suffix "}" translation))) non-first-part-p) (setq thogai-glue t)) + ;; Cancel formatting. + ("{}" + (setq thogai-attach-next nil + thogai-capitalize-next-word nil + thogai-glue nil + thogai-uncapitalize-next-word nil)) ;; Period, question mark or exclamation mark ((or "{.}" "{?}" "{!}") (insert (string-remove-prefix "{" (string-remove-suffix "}" translation))) |