diff options
| author | Kenichi Handa | 2008-05-14 01:56:07 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-14 01:56:07 +0000 |
| commit | d04effb34e74720a12f14b1881ca66363c335d25 (patch) | |
| tree | 004e76010fd691825a7743d2ed667140b16084a2 | |
| parent | e096e30efcc51706edc0aaa34d46d7ccba1413b7 (diff) | |
| download | emacs-d04effb34e74720a12f14b1881ca66363c335d25.tar.gz emacs-d04effb34e74720a12f14b1881ca66363c335d25.zip | |
(compose-chars-after): Assume that WINDOW is always non-nil.
| -rw-r--r-- | lisp/composite.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/composite.el b/lisp/composite.el index b3270327321..3106f726ed5 100644 --- a/lisp/composite.el +++ b/lisp/composite.el | |||
| @@ -341,7 +341,7 @@ This function is the default value of `compose-chars-after-function'." | |||
| 341 | pattern func result) | 341 | pattern func result) |
| 342 | (or limit | 342 | (or limit |
| 343 | (setq limit (if (stringp object) (length object) (point-max)))) | 343 | (setq limit (if (stringp object) (length object) (point-max)))) |
| 344 | (when tail | 344 | (when (and font-obj tail) |
| 345 | (save-match-data | 345 | (save-match-data |
| 346 | (save-excursion | 346 | (save-excursion |
| 347 | (while tail | 347 | (while tail |
| @@ -495,9 +495,8 @@ This function is the default value of `auto-composition-function' (which see)." | |||
| 495 | (let* ((ch (aref string from)) | 495 | (let* ((ch (aref string from)) |
| 496 | (elt (aref table ch)) | 496 | (elt (aref table ch)) |
| 497 | font-obj newpos) | 497 | font-obj newpos) |
| 498 | (when elt | 498 | (when (and elt |
| 499 | (if window | 499 | (setq font-obj (font-at from window string))) |
| 500 | (setq font-obj (font-at from window string))) | ||
| 501 | (if (functionp elt) | 500 | (if (functionp elt) |
| 502 | (setq newpos (funcall elt from to font-obj string)) | 501 | (setq newpos (funcall elt from to font-obj string)) |
| 503 | (while (and elt | 502 | (while (and elt |
| @@ -517,9 +516,8 @@ This function is the default value of `auto-composition-function' (which see)." | |||
| 517 | (let* ((ch (char-after from)) | 516 | (let* ((ch (char-after from)) |
| 518 | (elt (aref table ch)) | 517 | (elt (aref table ch)) |
| 519 | func pattern font-obj newpos) | 518 | func pattern font-obj newpos) |
| 520 | (when elt | 519 | (when (and elt |
| 521 | (if window | 520 | (setq font-obj (font-at from window))) |
| 522 | (setq font-obj (font-at from window))) | ||
| 523 | (if (functionp elt) | 521 | (if (functionp elt) |
| 524 | (setq newpos (funcall elt from to font-obj nil)) | 522 | (setq newpos (funcall elt from to font-obj nil)) |
| 525 | (goto-char from) | 523 | (goto-char from) |
| @@ -659,7 +657,7 @@ With arg, enable it if and only if arg is positive." | |||
| 659 | (font-obj (and (display-multi-font-p) | 657 | (font-obj (and (display-multi-font-p) |
| 660 | (font-at (point) (selected-window)))) | 658 | (font-at (point) (selected-window)))) |
| 661 | (pos (point))) | 659 | (pos (point))) |
| 662 | (if (functionp func) | 660 | (if (and (functionp func) font-obj) |
| 663 | (goto-char (funcall func (point) to font-obj nil))) | 661 | (goto-char (funcall func (point) to font-obj nil))) |
| 664 | (if (<= (point) pos) | 662 | (if (<= (point) pos) |
| 665 | (forward-char 1))))) | 663 | (forward-char 1))))) |