aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2006-11-10 06:34:30 +0000
committerKenichi Handa2006-11-10 06:34:30 +0000
commit7081063405c7a72fc9a6d2bb3f96418fa2213bdd (patch)
tree44c28221beda5ab34da57f1a26bd5ffc689b170d
parent13f588067f2f192ef967771f10ba5b841d0a3ab1 (diff)
downloademacs-7081063405c7a72fc9a6d2bb3f96418fa2213bdd.tar.gz
emacs-7081063405c7a72fc9a6d2bb3f96418fa2213bdd.zip
(terminal-composition-modification): New function.
(terminal-composition-function): Create composition with the above modification function.
-rw-r--r--lisp/composite.el15
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'.")
427 427
428(put 'save-buffer-state 'lisp-indent-function 1) 428(put 'save-buffer-state 'lisp-indent-function 1)
429 429
430;; This function is called when a composition created by
431;; terminal-composition-function is partially modified.
432(defun terminal-composition-modification (from to)
433 (terminal-composition-function from))
434
430(defun terminal-composition-function (pos &optional string) 435(defun terminal-composition-function (pos &optional string)
431 "General composition function used on terminal. 436 "General composition function used on terminal.
432Non-spacing characters are composed with the preceding spacing 437Non-spacing characters are composed with the preceding spacing
@@ -441,13 +446,13 @@ character. All non-spacing characters has this function in
441 (= (aref char-width-table (char-after pos)) 0)) 446 (= (aref char-width-table (char-after pos)) 0))
442 (setq pos (1+ pos))) 447 (setq pos (1+ pos)))
443 (if (and (>= from (point-min)) 448 (if (and (>= from (point-min))
444 (= (aref (symbol-name (get-char-code-property (char-after from) 449 (= (aref (symbol-name (get-char-code-property
445 'general-category)) 450 (char-after from)
446 0) 451 'general-category)) 0) ?L))
447 ?L))
448 (compose-region from pos (buffer-substring from pos)) 452 (compose-region from pos (buffer-substring from pos))
449 (compose-region (1+ from) pos 453 (compose-region (1+ from) pos
450 (concat " " (buffer-substring (1+ from) pos)))) 454 (concat " " (buffer-substring (1+ from) pos))
455 'terminal-composition-modification))
451 pos))) 456 pos)))
452 457
453(defvar terminal-composition-function-table 458(defvar terminal-composition-function-table