From: Eli Zaretskii Date: Tue, 16 Mar 1999 14:18:40 +0000 (+0000) Subject: (set-language-environment): Don't use X-Git-Tag: emacs-20.4~458 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec241f58e0d5d01fc340ff8cf42cf43db5bf22e1;p=emacs.git (set-language-environment): Don't use cpNNN-nonascii-translation-table if it is unbound. --- diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 1cc43e8b640..68c91a75aca 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1247,19 +1247,16 @@ specifies the character set for the major languages of Western Europe." (setq input-method-history (cons input-method (delete input-method input-method-history)))))) - (let ((nonascii (get-language-info language-name 'nonascii-translation))) + (let ((nonascii (get-language-info language-name 'nonascii-translation)) + (dos-table + (intern (concat "cp" dos-codepage "-nonascii-translation-table")))) (cond ((char-table-p nonascii) (setq nonascii-translation-table nonascii)) - ((eq window-system 'pc) + ((and (eq window-system 'pc) (boundp dos-table)) ;; DOS terminals' default is to use a special non-ASCII translation ;; table as appropriate for the installed codepage. - (setq - nonascii-translation-table (symbol-value - (intern - (concat "cp" - dos-codepage - "-nonascii-translation-table"))))) + (setq nonascii-translation-table (symbol-value dos-table))) ((charsetp nonascii) (setq nonascii-insert-offset (- (make-char nonascii) 128)))))