aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2006-07-24 04:45:35 +0000
committerKenichi Handa2006-07-24 04:45:35 +0000
commit5bb686535d2ed55f6311a421490c1ea7be64ed57 (patch)
treed7269bcae407bf86a5934cf5d038743d5906597b
parent0bd4cc79df4c781897aecbc8de8b222e62099e41 (diff)
downloademacs-5bb686535d2ed55f6311a421490c1ea7be64ed57.tar.gz
emacs-5bb686535d2ed55f6311a421490c1ea7be64ed57.zip
(auto-compose-current-font): New variable.
(auto-compose-chars): New arg FONT-OBJECT.
-rw-r--r--lisp/composite.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/composite.el b/lisp/composite.el
index b9368d54274..ddf56d35434 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -427,10 +427,14 @@ 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(defun auto-compose-chars (pos string) 430(defvar auto-compose-current-font nil
431 "The current font-object used for characters being composed automatically.")
432
433(defun auto-compose-chars (pos string font-object)
431 "Compose characters after the buffer position POS. 434 "Compose characters after the buffer position POS.
432If STRING is non-nil, it is a string, and POS is an index into the string. 435If STRING is non-nil, it is a string, and POS is an index into the string.
433In that case, compose characters in the string. 436In that case, compose characters in the string.
437FONT-OBJECT is a font selected for the character at POS.
434 438
435This function is the default value of `auto-composition-function' (which see)." 439This function is the default value of `auto-composition-function' (which see)."
436 (save-buffer-state nil 440 (save-buffer-state nil
@@ -439,6 +443,7 @@ This function is the default value of `auto-composition-function' (which see)."
439 (condition-case nil 443 (condition-case nil
440 (let ((start pos) 444 (let ((start pos)
441 (limit (if string (length string) (point-max))) 445 (limit (if string (length string) (point-max)))
446 (auto-compose-current-font font-object)
442 ch func newpos) 447 ch func newpos)
443 (setq limit 448 (setq limit
444 (or (text-property-any pos limit 'auto-composed t string) 449 (or (text-property-any pos limit 'auto-composed t string)