changeset 90318:8dfaaddb06fc

(encoded-kbd-mode): Check saved-input-mode on turing off Encoded Kbd mode.
author Kenichi Handa <handa@m17n.org>
date Fri, 24 Feb 2006 11:55:47 +0000
parents 34c8b755296d
children c6cf8c705e11
files lisp/international/encoded-kb.el
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/encoded-kb.el	Fri Feb 24 08:08:56 2006 +0000
+++ b/lisp/international/encoded-kb.el	Fri Feb 24 11:55:47 2006 +0000
@@ -376,10 +376,11 @@
 		 coding)))
 
     ;; We are turning off Encoded-kbd mode.
-    (setq key-translation-map saved-key-translation-map
-	  saved-key-translation-map nil)
-    (apply 'set-input-mode saved-input-mode)
-    (setq saved-input-mode nil)))
+    (when saved-input-mode
+      (setq key-translation-map saved-key-translation-map
+	    saved-key-translation-map nil)
+      (apply 'set-input-mode saved-input-mode)
+      (setq saved-input-mode nil))))
 
 (provide 'encoded-kb)