Mercurial > emacs
changeset 90656:a85e3683b64f
(terminal-composition-modification): New function.
(terminal-composition-function): Create composition with the above
modification function.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 10 Nov 2006 06:34:30 +0000 |
parents | f1396baff620 |
children | a5ed1185f60d |
files | lisp/composite.el |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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