Commit 8a0e01e2 authored by Kenichi Handa's avatar Kenichi Handa

(auto-compose-chars): Fix previous change.

parent 6ec5974c
......@@ -411,29 +411,30 @@ This function is the default value of `auto-composition-function' (which see)."
(limit (if string (length string) (point-max)))
ch func newpos)
(setq limit (or (text-property-any pos limit 'auto-composed t string)
limit))
(catch 'tag
(if string
(while (< pos limit)
(setq ch (aref string pos))
(if (= ch ?\n)
(throw 'tag nil))
(setq func (aref composition-function-table ch))
(if (and (functionp func)
(setq newpos (funcall func pos string))
(> newpos pos))
(setq pos newpos)
(setq pos (1+ pos))))
(while (< pos limit)
(setq ch (char-after pos))
(if (= ch ?\n)
(throw 'tag nil))
(setq func (aref composition-function-table ch))
(if (and (functionp func)
(setq newpos (funcall func pos string))
(> newpos pos))
(setq pos newpos)
(setq pos (1+ pos))))))
limit)
pos (catch 'tag
(if string
(while (< pos limit)
(setq ch (aref string pos))
(if (= ch ?\n)
(throw 'tag (1+ pos)))
(setq func (aref composition-function-table ch))
(if (and (functionp func)
(setq newpos (funcall func pos string))
(> newpos pos))
(setq pos newpos)
(setq pos (1+ pos))))
(while (< pos limit)
(setq ch (char-after pos))
(if (= ch ?\n)
(throw 'tag (1+ pos)))
(setq func (aref composition-function-table ch))
(if (and (functionp func)
(setq newpos (funcall func pos string))
(> newpos pos))
(setq pos newpos)
(setq pos (1+ pos)))))
limit))
(put-text-property start pos 'auto-composed t string))))))
(setq auto-composition-function 'auto-compose-chars)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment