summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-01-29 02:55:34 +0100
committerStefan Kangas <stefan@marxist.se>2021-01-29 06:19:06 +0100
commita27512e21c710ab39a0b811701a952db482204c1 (patch)
treec4c735cb26b3f64d9f6c94de02ae7b7d4b69e47c
parentbab133e6d0bff03e5ddd7f43eca169f4843d5860 (diff)
downloademacs-a27512e21c710ab39a0b811701a952db482204c1.tar.gz
* lisp/flow-ctrl.el: Use lexical-binding.
* lisp/flow-ctrl.el (enable-flow-control): Minor cleanup.
-rw-r--r--lisp/flow-ctrl.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el
index 656edf2eb09..adb52d7253a 100644
--- a/lisp/flow-ctrl.el
+++ b/lisp/flow-ctrl.el
@@ -1,4 +1,4 @@
-;;; flow-ctrl.el --- help for lusers on cu(1) or ttys with wired-in ^S/^Q flow control
+;;; flow-ctrl.el --- help for lusers on cu(1) or ttys with wired-in ^S/^Q flow control -*- lexical-binding: t -*-
;; Copyright (C) 1990-1991, 1994, 2001-2021 Free Software Foundation,
;; Inc.
@@ -64,12 +64,11 @@ 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)))
- (if keyboard-translate-table
- (progn
- (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))))
+ (when keyboard-translate-table
+ (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)))
;; 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)))