summaryrefslogtreecommitdiff
path: root/lisp/flow-ctrl.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-05-28 12:54:52 +0000
committerRichard M. Stallman <rms@gnu.org>1994-05-28 12:54:52 +0000
commitf87de92aa2bd02096608d38d295136666533e83d (patch)
tree3f0b477e0d9a1605908484eaa2b8461988687cab /lisp/flow-ctrl.el
parentc870ab8eb30759ccc135b8c47840bd998049bdcd (diff)
downloademacs-f87de92aa2bd02096608d38d295136666533e83d.tar.gz
(enable-flow-control): Fix bugs turning off flow ctrl.
Diffstat (limited to 'lisp/flow-ctrl.el')
-rw-r--r--lisp/flow-ctrl.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el
index f871493c0a2..e2cef00684b 100644
--- a/lisp/flow-ctrl.el
+++ b/lisp/flow-ctrl.el
@@ -62,10 +62,14 @@ With arg, enable flow control mode if arg is positive, otherwise disable."
(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)))