changeset 88981:28fee7bb4dab

(reset-language-environment): Don't set nonascii-translation-table and nonascii-insert-offset. Call set-unibyte-charset, not set-primary-charset. (nonascii-translation-table, nonascii-insert-offset): Declare these variable as obsolete ones. (set-language-environment): Call set-unibyte-charset, not set-primary-charset. Call set-charset-priority with `charset' info of the language environment.
author Kenichi Handa <handa@m17n.org>
date Thu, 15 Aug 2002 02:27:11 +0000
parents 90ed3c3cd1cc
children d50b0a9ea97a
files lisp/international/mule-cmds.el
diffstat 1 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Thu Aug 15 01:26:01 2002 +0000
+++ b/lisp/international/mule-cmds.el	Thu Aug 15 02:27:11 2002 +0000
@@ -726,8 +726,8 @@
 
   documentation      value is documentation of what this language environment
 			is meant for, and how to use it.
-  charset	     value is a list of the character sets used by this
-			language environment.
+  charset	     value is a list of the character sets mainly used
+			by this language environment.
   sample-text	     value is an expression which is evalled to generate
                         a line of text written using characters appropriate
                         for this language environment.
@@ -744,10 +744,9 @@
 			This is used to set up the coding system priority
 			list when you switch to this language environment.
   nonascii-translation
-		     value is a translation table to be set in the
-			variable `nonascii-translation-table' in this
-			language environment, or a character set from
-			which `nonascii-insert-offset' is calculated.
+		     value is a charset of dimension one to use for
+			converting a unibyte character to multibyte
+			and vice versa.
   input-method       value is a default input method for this language
 			environment.
   features           value is a list of features requested in this
@@ -1362,9 +1361,7 @@
 ;;;  (set-terminal-coding-system-internal nil)
 ;;;  (set-keyboard-coding-system-internal nil)
 
-  (setq nonascii-translation-table nil
-	nonascii-insert-offset 0)
-  (set-primary-charset 'iso-8859-1))
+  (set-unibyte-charset 'iso-8859-1))
 
 (reset-language-environment)
 
@@ -1418,14 +1415,17 @@
 		(cons input-method
 		      (delete input-method input-method-history))))))
 
+  (apply 'set-charset-priority  (get-language-info language-name 'charset))
+
   ;; Note: For DOS, we assumed that the charset cpXXX is already
   ;; defined.
   (let ((nonascii (get-language-info language-name 'nonascii-translation)))
     (if (eq window-system 'pc)
 	(setq nonascii (intern "cp%d" dos-codepage)))
-    (or (charsetp nonascii)
+    (or (and (charsetp nonascii)
+	     (= (charset-dimension nonascii) 1))
 	(setq nonascii 'iso-8859-1))
-    (set-primary-charset nonascii))
+    (set-unibyte-charset nonascii))
 
   ;; Unibyte setups if necessary.
   (unless default-enable-multibyte-characters
@@ -2058,4 +2058,8 @@
   :group 'mule
   :global t)
 
+(defvar nonascii-insert-offset 0 "This variable is obsolete.")
+(defvar nonascii-translation-table nil "This variable is obsolete.")
+
+
 ;;; mule-cmds.el ends here