diff options
author | Arun Isaac | 2022-06-16 01:44:01 +0530 |
---|---|---|
committer | Arun Isaac | 2022-06-16 01:44:01 +0530 |
commit | a6b171c122388e07aa3b70b71a1a761221b6713a (patch) | |
tree | 3053227f2388b274899561787748634f7ec6159f | |
parent | 0378b39603440f945f1b2f12d83e04dca82d177d (diff) | |
download | thogai-a6b171c122388e07aa3b70b71a1a761221b6713a.tar.gz thogai-a6b171c122388e07aa3b70b71a1a761221b6713a.tar.lz thogai-a6b171c122388e07aa3b70b71a1a761221b6713a.zip |
Implement capitalization carry.
* thogai.el (thogai-insert-translation): Implement capitalization
carry.
-rw-r--r-- | thogai.el | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -258,6 +258,15 @@ External callers should always pass nil as the value." (concat (string-remove-prefix "{" (string-remove-suffix "^}" translation)) "{^}") non-first-part-p)) + ;; Carry capitalization. + ((pred (lambda (str) + (string-prefix-p "{~|" str))) + (let ((capitalization-state thogai-capitalize-next-word)) + (let ((thogai-capitalize-next-word nil)) + (thogai-insert-translation + (string-remove-prefix "{~|" (string-remove-suffix "}" translation)) + non-first-part-p)) + (setq thogai-capitalize-next-word capitalization-state))) ;; Glue operator ((pred (lambda (str) (string-prefix-p "{&" str))) |