summaryrefslogtreecommitdiff
path: root/lisp/composite.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2007-12-01 04:19:31 +0000
committerKenichi Handa <handa@m17n.org>2007-12-01 04:19:31 +0000
commit4fa0f779ce3a1d8c302b09f991d1303576f6b526 (patch)
tree42d48c0d2ba40027546ee8d0a2b81678fa8ae8f2 /lisp/composite.el
parentb8c79e870d0d5368401b6cb99f21fecf3536031e (diff)
downloademacs-4fa0f779ce3a1d8c302b09f991d1303576f6b526.tar.gz
(auto-compose-chars): Argument font-object changed
to window.
Diffstat (limited to 'lisp/composite.el')
-rw-r--r--lisp/composite.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/composite.el b/lisp/composite.el
index 278b7e3bf62..5ee62412b62 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -470,11 +470,11 @@ on a terminal.")
(defvar auto-compose-current-font nil
"The current font-object used for characters being composed automatically.")
-(defun auto-compose-chars (pos string font-object)
+(defun auto-compose-chars (pos string window)
"Compose characters after the buffer position POS.
If STRING is non-nil, it is a string, and POS is an index into the string.
In that case, compose characters in the string.
-FONT-OBJECT is a font selected for the character at POS.
+WINDOW is a window displaying the current buffer.
This function is the default value of `auto-composition-function' (which see)."
(save-buffer-state nil
@@ -483,10 +483,10 @@ This function is the default value of `auto-composition-function' (which see)."
(condition-case nil
(let ((start pos)
(limit (if string (length string) (point-max)))
- (auto-compose-current-font font-object)
(table (if (display-graphic-p)
composition-function-table
terminal-composition-function-table))
+ auto-compose-current-font
ch func newpos)
(setq limit
(or (text-property-any pos limit 'auto-composed t string)
@@ -500,6 +500,9 @@ This function is the default value of `auto-composition-function' (which see)."
(throw 'tag (1+ pos)))
(setq func (aref table ch))
(if (and (functionp func)
+ (setq auto-compose-current-font
+ (and window
+ (font-at pos window string)))
(setq newpos (funcall func pos string))
(> newpos pos))
(setq pos newpos)
@@ -510,6 +513,8 @@ This function is the default value of `auto-composition-function' (which see)."
(throw 'tag (1+ pos)))
(setq func (aref table ch))
(if (and (functionp func)
+ (setq auto-compose-current-font
+ (and window (font-at pos window)))
(setq newpos (funcall func pos string))
(> newpos pos))
(setq pos newpos)