changeset 7731:3cfe5791ddfb

(enable-flow-control): Fix bugs turning off flow ctrl.
author Richard M. Stallman <rms@gnu.org>
date Sat, 28 May 1994 12:54:52 +0000
parents 3846302b9c9c
children b99162ca5247
files lisp/flow-ctrl.el
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/flow-ctrl.el	Sat May 28 12:33:08 1994 +0000
+++ b/lisp/flow-ctrl.el	Sat May 28 12:54:52 1994 +0000
@@ -62,10 +62,14 @@
       (progn
 	;; Turn flow control off, and stop exchanging chars.
 	(set-input-mode t nil (nth 2 (current-input-mode)))
-	(aset keyboard-translate-table flow-control-c-s-replacement nil)
-	(aset keyboard-translate-table ?\^s nil)
-	(aset keyboard-translate-table flow-control-c-q-replacement nil)
-	(aset keyboard-translate-table ?\^q nil))
+	(if keyboard-translate-table
+	    (progn
+	      (aset keyboard-translate-table flow-control-c-s-replacement
+		    flow-control-c-s-replacement)
+	      (aset keyboard-translate-table ?\^s ?\^s)
+	      (aset keyboard-translate-table flow-control-c-q-replacement
+		    flow-control-c-q-replacement)
+	      (aset keyboard-translate-table ?\^q ?\^q))))
     ;; Turn flow control on.
     ;; Tell emacs to pass C-s and C-q to OS.
     (set-input-mode nil t (nth 2 (current-input-mode)))