summaryrefslogtreecommitdiff
path: root/lisp/composite.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2000-07-27 05:37:42 +0000
committerKenichi Handa <handa@m17n.org>2000-07-27 05:37:42 +0000
commit339cebdcbe970ce30d6bb2d29b63c15bc8de40df (patch)
tree4731dbbe6fd03e3b4d806e6d3d34056cdf76fe66 /lisp/composite.el
parent90cf4474cac53fad43687314376322e56001ea26 (diff)
downloademacs-339cebdcbe970ce30d6bb2d29b63c15bc8de40df.tar.gz
(compose-chars-after): Preserve match data.
Diffstat (limited to 'lisp/composite.el')
-rw-r--r--lisp/composite.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/composite.el b/lisp/composite.el
index e14aeab3e3e..888ba5ad134 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -338,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