# HG changeset patch # User Kenichi Handa # Date 1163140470 0 # Node ID a85e3683b64ff9d27c2b9ceeaf55588c71184804 # Parent f1396baff6206f0e80ec6417475466cbf96a46fd (terminal-composition-modification): New function. (terminal-composition-function): Create composition with the above modification function. diff -r f1396baff620 -r a85e3683b64f lisp/composite.el --- a/lisp/composite.el Thu Nov 09 03:47:14 2006 +0000 +++ b/lisp/composite.el Fri Nov 10 06:34:30 2006 +0000 @@ -427,6 +427,11 @@ (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 @@ (= (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