Commit 61251338 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(enable-flow-control...): Renamed from evade...

(enable-flow-control): Add autoload.
parent 3fff2dfa
......@@ -32,19 +32,20 @@
;;;; terminal.
;;;; To invoke these adjustments, a user need only invoke the function
;;;; evade-flow-control-on with a list of terminal types in his/her own
;;;; enable-flow-control-on with a list of terminal types in his/her own
;;;; .emacs file. As arguments, give it the names of one or more terminal
;;;; types in use by that user which require flow control adjustments.
;;;; Here's an example:
;;;; (evade-flow-control-on "vt200" "vt300" "vt101" "vt131")
;;;; (enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
;;; Portability note: This uses (getenv "TERM"), and therefore probably
;;; won't work outside of UNIX-like environments.
;;; Code:
(defun evade-flow-control ()
(defun enable-flow-control ()
"Enable use of flow control; let user type C-s as C-\ and C-q as C-^."
;; Tell emacs to pass C-s and C-q to OS.
......@@ -72,15 +73,15 @@
": use C-\\ for C-s and use C-^ for C-q."))
(sleep-for 2)) ; Give user a chance to see message.
(defun evade-flow-control-memstr= (e s)
(defun enable-flow-control-memstr= (e s)
(cond ((null s) nil)
((string= e (car s)) t)
(t (evade-flow-control-memstr= e (cdr s)))))
(t (enable-flow-control-memstr= e (cdr s)))))
(defun evade-flow-control-on (&rest losing-terminal-types)
(defun enable-flow-control-on (&rest losing-terminal-types)
"Enable flow control if using one of a specified set of terminal types.
Use `(evade-flow-control-on \"vt100\" \"h19\")' to enable flow control
Use `(enable-flow-control-on \"vt100\" \"h19\")' to enable flow control
on VT-100 and H19 terminals. When flow control is enabled,
you must type C-\\ to get the effect of a C-s, and type C-^
to get the effect of a C-q."
......@@ -89,8 +90,8 @@ to get the effect of a C-q."
;; Strip off hyphen and what follows
(while (setq hyphend (string-match "[-_][^-_]+$" term))
(setq term (substring term 0 hyphend)))
(and (evade-flow-control-memstr= term losing-terminal-types) (evade-flow-control)))
(and (enable-flow-control-memstr= term losing-terminal-types)
(provide 'flow-ctrl)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment