diff options
author | Kenichi Handa <handa@m17n.org> | 2006-11-10 06:34:30 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2006-11-10 06:34:30 +0000 |
commit | 7081063405c7a72fc9a6d2bb3f96418fa2213bdd (patch) | |
tree | 44c28221beda5ab34da57f1a26bd5ffc689b170d /lisp/composite.el | |
parent | 13f588067f2f192ef967771f10ba5b841d0a3ab1 (diff) | |
download | emacs-7081063405c7a72fc9a6d2bb3f96418fa2213bdd.tar.gz |
(terminal-composition-modification): New function.
(terminal-composition-function): Create composition with the above
modification function.
Diffstat (limited to 'lisp/composite.el')
-rw-r--r-- | lisp/composite.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/composite.el b/lisp/composite.el index 30010f0f56d..b6626ecc8dd 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -427,6 +427,11 @@ See also the command `toggle-auto-composition'.") (put 'save-buffer-state 'lisp-indent-function 1) +;; This function is called when a composition created by +;; terminal-composition-function is partially modified. +(defun terminal-composition-modification (from to) + (terminal-composition-function from)) + (defun terminal-composition-function (pos &optional string) "General composition function used on terminal. Non-spacing characters are composed with the preceding spacing @@ -441,13 +446,13 @@ character. All non-spacing characters has this function in (= (aref char-width-table (char-after pos)) 0)) (setq pos (1+ pos))) (if (and (>= from (point-min)) - (= (aref (symbol-name (get-char-code-property (char-after from) - 'general-category)) - 0) - ?L)) + (= (aref (symbol-name (get-char-code-property + (char-after from) + 'general-category)) 0) ?L)) (compose-region from pos (buffer-substring from pos)) (compose-region (1+ from) pos - (concat " " (buffer-substring (1+ from) pos)))) + (concat " " (buffer-substring (1+ from) pos)) + 'terminal-composition-modification)) pos))) (defvar terminal-composition-function-table |