]> code.delx.au - gnu-emacs/blobdiff - lisp/international/utf-8.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / international / utf-8.el
index 681d2454dc1e91a8a6863e6afa75e574e7fe85ae..66e8181c7cabefb3bf7681147a122b76f58e9fa6 100644 (file)
@@ -14,7 +14,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
+;; the Free Software Foundation; either version 2, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -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)