1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00

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

(enable-flow-control): Add autoload.
This commit is contained in:
Richard M. Stallman 1993-02-11 23:32:07 +00:00
parent 3fff2dfa0c
commit 6125133886

View File

@ -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 ()
;;;###autoload
(defun enable-flow-control ()
"Enable use of flow control; let user type C-s as C-\ and C-q as C-^."
(interactive)
;; 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)))))
;;;###autoload
(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)
(enable-flow-control))))
(provide 'flow-ctrl)