From 7c0953573e29df316e98d8efef4f55848bfcc448 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 20 Jul 2007 01:53:08 +0000 Subject: [PATCH] (utf-8-post-read-conversion): Temporarily bind utf-8-compose-scripts to nil while running *-compose-region functions. --- lisp/international/utf-8.el | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index 2d8791b49e3..66e8181c7ca 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el @@ -991,16 +991,20 @@ Also compose particular scripts if `utf-8-compose-scripts' is non-nil." (set-buffer-multibyte nil))) (when (and utf-8-compose-scripts (> length 1)) - ;; These currently have definitions which cover the relevant - ;; unicodes. We could avoid loading thai-util &c by checking - ;; whether the region contains any characters with the appropriate - ;; categories. There aren't yet Unicode-based rules for Tibetan. - (diacritic-compose-region (point-max) (point-min)) - (thai-compose-region (point-max) (point-min)) - (lao-compose-region (point-max) (point-min)) - (devanagari-compose-region (point-max) (point-min)) - (malayalam-compose-region (point-max) (point-min)) - (tamil-compose-region (point-max) (point-min))) + ;; This let-binding avoids recursive auto-loading. And, we + ;; anyway don't have to run the following code while + ;; auto-loading. + (let ((utf-8-compose-scripts nil)) + ;; These currently have definitions which cover the relevant + ;; unicodes. We could avoid loading thai-util &c by checking + ;; whether the region contains any characters with the appropriate + ;; categories. There aren't yet Unicode-based rules for Tibetan. + (diacritic-compose-region (point-max) (point-min)) + (thai-compose-region (point-max) (point-min)) + (lao-compose-region (point-max) (point-min)) + (devanagari-compose-region (point-max) (point-min)) + (malayalam-compose-region (point-max) (point-min)) + (tamil-compose-region (point-max) (point-min)))) (- (point-max) (point-min))))) (defun utf-8-pre-write-conversion (beg end) -- 2.39.2