summaryrefslogtreecommitdiff
path: root/lisp/composite.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2008-05-14 01:56:07 +0000
committerKenichi Handa <handa@m17n.org>2008-05-14 01:56:07 +0000
commitd04effb34e74720a12f14b1881ca66363c335d25 (patch)
tree004e76010fd691825a7743d2ed667140b16084a2 /lisp/composite.el
parente096e30efcc51706edc0aaa34d46d7ccba1413b7 (diff)
downloademacs-d04effb34e74720a12f14b1881ca66363c335d25.tar.gz
(compose-chars-after): Assume that WINDOW is always non-nil.
Diffstat (limited to 'lisp/composite.el')
-rw-r--r--lisp/composite.el14
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'."
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 @@ This function is the default value of `auto-composition-function' (which see)."
(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 @@ This function is the default value of `auto-composition-function' (which see)."
(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 @@ With arg, enable it if and only if arg is positive."
(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)))))