diff options
| author | Kenichi Handa | 2007-12-01 04:19:31 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2007-12-01 04:19:31 +0000 |
| commit | 4fa0f779ce3a1d8c302b09f991d1303576f6b526 (patch) | |
| tree | 42d48c0d2ba40027546ee8d0a2b81678fa8ae8f2 | |
| parent | b8c79e870d0d5368401b6cb99f21fecf3536031e (diff) | |
| download | emacs-4fa0f779ce3a1d8c302b09f991d1303576f6b526.tar.gz emacs-4fa0f779ce3a1d8c302b09f991d1303576f6b526.zip | |
(auto-compose-chars): Argument font-object changed
to window.
| -rw-r--r-- | lisp/composite.el | 11 |
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.") | |||
| 470 | (defvar auto-compose-current-font nil | 470 | (defvar auto-compose-current-font nil |
| 471 | "The current font-object used for characters being composed automatically.") | 471 | "The current font-object used for characters being composed automatically.") |
| 472 | 472 | ||
| 473 | (defun auto-compose-chars (pos string font-object) | 473 | (defun auto-compose-chars (pos string window) |
| 474 | "Compose characters after the buffer position POS. | 474 | "Compose characters after the buffer position POS. |
| 475 | If STRING is non-nil, it is a string, and POS is an index into the string. | 475 | If STRING is non-nil, it is a string, and POS is an index into the string. |
| 476 | In that case, compose characters in the string. | 476 | In that case, compose characters in the string. |
| 477 | FONT-OBJECT is a font selected for the character at POS. | 477 | WINDOW is a window displaying the current buffer. |
| 478 | 478 | ||
| 479 | This function is the default value of `auto-composition-function' (which see)." | 479 | This function is the default value of `auto-composition-function' (which see)." |
| 480 | (save-buffer-state nil | 480 | (save-buffer-state nil |
| @@ -483,10 +483,10 @@ This function is the default value of `auto-composition-function' (which see)." | |||
| 483 | (condition-case nil | 483 | (condition-case nil |
| 484 | (let ((start pos) | 484 | (let ((start pos) |
| 485 | (limit (if string (length string) (point-max))) | 485 | (limit (if string (length string) (point-max))) |
| 486 | (auto-compose-current-font font-object) | ||
| 487 | (table (if (display-graphic-p) | 486 | (table (if (display-graphic-p) |
| 488 | composition-function-table | 487 | composition-function-table |
| 489 | terminal-composition-function-table)) | 488 | terminal-composition-function-table)) |
| 489 | auto-compose-current-font | ||
| 490 | ch func newpos) | 490 | ch func newpos) |
| 491 | (setq limit | 491 | (setq limit |
| 492 | (or (text-property-any pos limit 'auto-composed t string) | 492 | (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)." | |||
| 500 | (throw 'tag (1+ pos))) | 500 | (throw 'tag (1+ pos))) |
| 501 | (setq func (aref table ch)) | 501 | (setq func (aref table ch)) |
| 502 | (if (and (functionp func) | 502 | (if (and (functionp func) |
| 503 | (setq auto-compose-current-font | ||
| 504 | (and window | ||
| 505 | (font-at pos window string))) | ||
| 503 | (setq newpos (funcall func pos string)) | 506 | (setq newpos (funcall func pos string)) |
| 504 | (> newpos pos)) | 507 | (> newpos pos)) |
| 505 | (setq pos newpos) | 508 | (setq pos newpos) |
| @@ -510,6 +513,8 @@ This function is the default value of `auto-composition-function' (which see)." | |||
| 510 | (throw 'tag (1+ pos))) | 513 | (throw 'tag (1+ pos))) |
| 511 | (setq func (aref table ch)) | 514 | (setq func (aref table ch)) |
| 512 | (if (and (functionp func) | 515 | (if (and (functionp func) |
| 516 | (setq auto-compose-current-font | ||
| 517 | (and window (font-at pos window))) | ||
| 513 | (setq newpos (funcall func pos string)) | 518 | (setq newpos (funcall func pos string)) |
| 514 | (> newpos pos)) | 519 | (> newpos pos)) |
| 515 | (setq pos newpos) | 520 | (setq pos newpos) |