From 7dd42fb1d9f2f9f3e02fde215b837e3729ac4529 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 15 Aug 2002 02:27:11 +0000 Subject: [PATCH] (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. --- lisp/international/mule-cmds.el | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 42fb7b4c29e..3172e11115c 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -726,8 +726,8 @@ Meaningful values for KEY include 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 @@ Meaningful values for KEY include 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 @@ The default status is as follows: ;;; (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 @@ specifies the character set for the major languages of Western Europe." (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 @@ If CODING-SYSTEM can't safely encode CHAR, return nil." :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 -- 2.11.4.GIT