]> git.eshelyaron.com Git - emacs.git/commitdiff
(auto-compose-chars): Fix previous change.
authorKenichi Handa <handa@m17n.org>
Wed, 26 Nov 2003 11:54:07 +0000 (11:54 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 26 Nov 2003 11:54:07 +0000 (11:54 +0000)
lisp/composite.el

index 4f8f1cb4ce28b012c581218b11f8d598c41f987e..0b91656d477ca25e66155b87b3d3b5bf90943fd4 100644 (file)
@@ -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)