29 |
;; Terminals that use XON/XOFF flow control can cause problems with |
;; Terminals that use XON/XOFF flow control can cause problems with |
30 |
;; GNU Emacs users. This file contains Emacs Lisp code that makes it |
;; GNU Emacs users. This file contains Emacs Lisp code that makes it |
31 |
;; easy for a user to deal with this problem, when using such a |
;; easy for a user to deal with this problem, when using such a |
32 |
;; terminal. |
;; terminal. |
33 |
;; |
;; |
34 |
;; To invoke these adjustments, a user need only invoke the function |
;; To invoke these adjustments, a user need only invoke the function |
35 |
;; enable-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 |
36 |
;; .emacs file. As arguments, give it the names of one or more terminal |
;; .emacs file. As arguments, give it the names of one or more terminal |
37 |
;; types in use by that user which require flow control adjustments. |
;; types in use by that user which require flow control adjustments. |
38 |
;; Here's an example: |
;; Here's an example: |
39 |
;; |
;; |
40 |
;; (enable-flow-control-on "vt200" "vt300" "vt101" "vt131") |
;; (enable-flow-control-on "vt200" "vt300" "vt101" "vt131") |
41 |
|
|
42 |
;; Portability note: This uses (getenv "TERM"), and therefore probably |
;; Portability note: This uses (getenv "TERM"), and therefore probably |
96 |
(aset keyboard-translate-table flow-control-c-q-replacement ?\^q) |
(aset keyboard-translate-table flow-control-c-q-replacement ?\^q) |
97 |
(aset keyboard-translate-table ?\^q flow-control-c-q-replacement) |
(aset keyboard-translate-table ?\^q flow-control-c-q-replacement) |
98 |
(message "XON/XOFF adjustment for %s: use %s for C-s, and use %s for C-q" |
(message "XON/XOFF adjustment for %s: use %s for C-s, and use %s for C-q" |
99 |
(getenv "TERM") |
(getenv "TERM") |
100 |
(single-key-description flow-control-c-s-replacement) |
(single-key-description flow-control-c-s-replacement) |
101 |
(single-key-description flow-control-c-q-replacement)) |
(single-key-description flow-control-c-q-replacement)) |
102 |
(sleep-for 2))) ; Give user a chance to see message. |
(sleep-for 2))) ; Give user a chance to see message. |