aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2000-07-27 05:37:42 +0000
committerKenichi Handa2000-07-27 05:37:42 +0000
commit339cebdcbe970ce30d6bb2d29b63c15bc8de40df (patch)
tree4731dbbe6fd03e3b4d806e6d3d34056cdf76fe66
parent90cf4474cac53fad43687314376322e56001ea26 (diff)
downloademacs-339cebdcbe970ce30d6bb2d29b63c15bc8de40df.tar.gz
emacs-339cebdcbe970ce30d6bb2d29b63c15bc8de40df.zip
(compose-chars-after): Preserve match data.
-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'."
338 (let ((tail (aref composition-function-table (char-after pos))) 338 (let ((tail (aref composition-function-table (char-after pos)))
339 pattern func result) 339 pattern func result)
340 (when tail 340 (when tail
341 (save-excursion 341 (save-match-data
342 (while (and tail (not func)) 342 (save-excursion
343 (setq pattern (car (car tail)) 343 (while (and tail (not func))
344 func (cdr (car tail))) 344 (setq pattern (car (car tail))
345 (goto-char pos) 345 func (cdr (car tail)))
346 (if (if limit 346 (goto-char pos)
347 (and (re-search-forward pattern limit t) 347 (if (if limit
348 (= (match-beginning 0) pos)) 348 (and (re-search-forward pattern limit t)
349 (looking-at pattern)) 349 (= (match-beginning 0) pos))
350 (setq result (funcall func pos (match-end 0) pattern nil)) 350 (looking-at pattern))
351 (setq func nil tail (cdr tail)))))) 351 (setq result (funcall func pos (match-end 0) pattern nil))
352 (setq func nil tail (cdr tail)))))))
352 result)) 353 result))
353 354
354;;;###autoload 355;;;###autoload