changeset 89907:df801f738c09

(auto-compose-chars): Execute the main code in condition-case.
author Kenichi Handa <handa@m17n.org>
date Thu, 15 Apr 2004 01:01:44 +0000
parents b62de4718394
children ee1402f7b568
files lisp/composite.el
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/composite.el	Wed Apr 14 12:45:19 2004 +0000
+++ b/lisp/composite.el	Thu Apr 15 01:01:44 2004 +0000
@@ -431,12 +431,15 @@
   (save-buffer-state nil
     (save-excursion
       (save-match-data
-	(let ((start pos)
-	      (limit (if string (length string) (point-max)))
-	      ch func newpos)
-	  (setq limit (or (text-property-any pos limit 'auto-composed t string)
-			  limit)
-		pos (catch 'tag
+	(condition-case nil
+	    (let ((start pos)
+		  (limit (if string (length string) (point-max)))
+		  ch func newpos)
+	      (setq limit
+		    (or (text-property-any pos limit 'auto-composed t string)
+			limit)
+		    pos 
+		    (catch 'tag
 		      (if string
 			  (while (< pos limit)
 			    (setq ch (aref string pos))
@@ -459,7 +462,8 @@
 			      (setq pos newpos)
 			    (setq pos (1+ pos)))))
 		      limit))
-	  (put-text-property start pos 'auto-composed t string))))))
+	      (put-text-property start pos 'auto-composed t string))
+	  (error nil))))))
 
 (setq auto-composition-function 'auto-compose-chars)