diff options
| author | Karl Heuer | 1995-12-21 17:43:20 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-12-21 17:43:20 +0000 |
| commit | 409adbc7fbb0c8e894f290a25dea20daf18c5f77 (patch) | |
| tree | 797187272c9d54cf1baf0fbf7404f29ae7807139 /lisp/flow-ctrl.el | |
| parent | 3a30dc2546dc1d79b74770082093112e64ad2438 (diff) | |
| download | emacs-409adbc7fbb0c8e894f290a25dea20daf18c5f77.tar.gz emacs-409adbc7fbb0c8e894f290a25dea20daf18c5f77.zip | |
(enable-flow-control-on): Try the whole TERM name
before trying to strip off words from the end.
Diffstat (limited to 'lisp/flow-ctrl.el')
| -rw-r--r-- | lisp/flow-ctrl.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el index 4bad32a0c11..deb6c11b233 100644 --- a/lisp/flow-ctrl.el +++ b/lisp/flow-ctrl.el | |||
| @@ -113,13 +113,16 @@ you must type C-\\ to get the effect of a C-s, and type C-^ | |||
| 113 | to get the effect of a C-q." | 113 | to get the effect of a C-q." |
| 114 | (let ((term (getenv "TERM")) | 114 | (let ((term (getenv "TERM")) |
| 115 | hyphend) | 115 | hyphend) |
| 116 | ;; Look for TERM in LOSING-TERMINAL-TYPES. | ||
| 117 | ;; If we don't find it literally, try stripping off words | ||
| 118 | ;; from the end, one by one. | ||
| 119 | (while (and term (not (member term losing-terminal-types))) | ||
| 120 | ;; Strip off last hyphen and what follows, then try again. | ||
| 121 | (if (setq hyphend (string-match "[-_][^-_]+$" term)) | ||
| 122 | (setq term (substring term 0 hyphend)) | ||
| 123 | (setq term nil))) | ||
| 116 | (if term | 124 | (if term |
| 117 | (progn | 125 | (enable-flow-control)))) |
| 118 | ;; Strip off hyphen and what follows | ||
| 119 | (while (setq hyphend (string-match "[-_][^-_]+$" term)) | ||
| 120 | (setq term (substring term 0 hyphend))) | ||
| 121 | (and (member term losing-terminal-types) | ||
| 122 | (enable-flow-control)))))) | ||
| 123 | 126 | ||
| 124 | (provide 'flow-ctrl) | 127 | (provide 'flow-ctrl) |
| 125 | 128 | ||