From 7081063405c7a72fc9a6d2bb3f96418fa2213bdd Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 10 Nov 2006 06:34:30 +0000 Subject: [PATCH] (terminal-composition-modification): New function. (terminal-composition-function): Create composition with the above modification function. --- lisp/composite.el | 15 ++++++++++----- 1 file 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 -- 2.39.5