changeset 44440:db660532bd23

(reset-language-environment): Handle coding-systems not being defined yet for bootstrapping.
author Jason Rumney <jasonr@gnu.org>
date Mon, 08 Apr 2002 19:22:17 +0000
parents d0bf98f4584b
children 19ee3d816bb2
files lisp/international/mule-cmds.el
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Mon Apr 08 17:16:21 2002 +0000
+++ b/lisp/international/mule-cmds.el	Mon Apr 08 19:22:17 2002 +0000
@@ -1415,11 +1415,17 @@
   ;; users shell appropriately, so should not be altered by changing
   ;; language environment.
   (let ((output-coding
-	 (coding-system-change-text-conversion
-	  (car default-process-coding-system) 'undecided))
+	 ;; When bootstrapping, coding-systems are not defined yet, so
+	 ;; we need to catch the error from check-coding-system.
+	 (condition-case nil 
+	     (coding-system-change-text-conversion
+	      (car default-process-coding-system) 'undecided)
+	   (coding-system-error 'undecided)))
 	(input-coding
-	 (coding-system-change-text-conversion
-	  (cdr default-process-coding-system) 'iso-latin-1)))
+	 (condition-case nil
+	     (coding-system-change-text-conversion
+	      (cdr default-process-coding-system) 'iso-latin-1)
+	   (coding-system-error 'iso-latin-1))))
     (setq default-process-coding-system
 	  (cons output-coding input-coding)))