changeset 24491:45b77df0b5ac

(set-language-environment): Don't use cpNNN-nonascii-translation-table if it is unbound.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 16 Mar 1999 14:18:40 +0000
parents 7a5f7af21c27
children 46906de4c968
files lisp/international/mule-cmds.el
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Tue Mar 16 14:14:55 1999 +0000
+++ b/lisp/international/mule-cmds.el	Tue Mar 16 14:18:40 1999 +0000
@@ -1247,19 +1247,16 @@
 	  (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)))))