(custom-face-value-create): If face name doesn't end with "face", add
[bpt/emacs.git] / lisp / composite.el
index 4a5d228..888ba5a 100644 (file)
@@ -297,7 +297,8 @@ WIDTH is a number of columns the composition occupies on the screen."
 
 \f
 ;; A char-table of functions to call for compositions.
-;;;###autoload(put 'composition-function-table 'char-table-extra-slots 0)
+;;;###autoload
+(put 'composition-function-table 'char-table-extra-slots 0)
 
 ;;;###autoload
 (defvar composition-function-table
@@ -337,17 +338,18 @@ This function is the default value of `compose-chars-after-function'."
   (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