changeset 30485:5551289a9329

(compose-chars-after): Preserve match data.
author Kenichi Handa <handa@m17n.org>
date Thu, 27 Jul 2000 05:37:42 +0000
parents 6fe6da44867f
children 56dec1b451fe
files lisp/composite.el
diffstat 1 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/composite.el	Thu Jul 27 05:37:13 2000 +0000
+++ b/lisp/composite.el	Thu Jul 27 05:37:42 2000 +0000
@@ -338,17 +338,18 @@
   (let ((tail (aref composition-function-table (char-after pos)))
 	pattern func result)
     (when tail
-      (save-excursion
-	(while (and tail (not func))		  
-	  (setq pattern (car (car tail))
-		func (cdr (car tail)))
-	  (goto-char pos)
-	  (if (if limit
-		  (and (re-search-forward pattern limit t)
-		       (= (match-beginning 0) pos))
-		(looking-at pattern))
-	      (setq result (funcall func pos (match-end 0) pattern nil))
-	    (setq func nil tail (cdr tail))))))
+      (save-match-data
+	(save-excursion
+	  (while (and tail (not func))		  
+	    (setq pattern (car (car tail))
+		  func (cdr (car tail)))
+	    (goto-char pos)
+	    (if (if limit
+		    (and (re-search-forward pattern limit t)
+			 (= (match-beginning 0) pos))
+		  (looking-at pattern))
+		(setq result (funcall func pos (match-end 0) pattern nil))
+	      (setq func nil tail (cdr tail)))))))
       result))
 
 ;;;###autoload