# HG changeset patch # User Kenichi Handa # Date 1210730167 0 # Node ID e22dd2392947add6c1ba57ec1654a445d20dd9ca # Parent 81ec00f72dc6c018c29bc0b11be8ce3654cc5eeb (compose-chars-after): Assume that WINDOW is always non-nil. diff -r 81ec00f72dc6 -r e22dd2392947 lisp/composite.el --- a/lisp/composite.el Wed May 14 01:55:46 2008 +0000 +++ b/lisp/composite.el Wed May 14 01:56:07 2008 +0000 @@ -341,7 +341,7 @@ pattern func result) (or limit (setq limit (if (stringp object) (length object) (point-max)))) - (when tail + (when (and font-obj tail) (save-match-data (save-excursion (while tail @@ -495,9 +495,8 @@ (let* ((ch (aref string from)) (elt (aref table ch)) font-obj newpos) - (when elt - (if window - (setq font-obj (font-at from window string))) + (when (and elt + (setq font-obj (font-at from window string))) (if (functionp elt) (setq newpos (funcall elt from to font-obj string)) (while (and elt @@ -517,9 +516,8 @@ (let* ((ch (char-after from)) (elt (aref table ch)) func pattern font-obj newpos) - (when elt - (if window - (setq font-obj (font-at from window))) + (when (and elt + (setq font-obj (font-at from window))) (if (functionp elt) (setq newpos (funcall elt from to font-obj nil)) (goto-char from) @@ -659,7 +657,7 @@ (font-obj (and (display-multi-font-p) (font-at (point) (selected-window)))) (pos (point))) - (if (functionp func) + (if (and (functionp func) font-obj) (goto-char (funcall func (point) to font-obj nil))) (if (<= (point) pos) (forward-char 1)))))