mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(enable-flow-control-on): Try the whole TERM name
before trying to strip off words from the end.
This commit is contained in:
parent
3a30dc2546
commit
409adbc7fb
1 changed files with 9 additions and 6 deletions
|
|
@ -113,13 +113,16 @@ you must type C-\\ to get the effect of a C-s, and type C-^
|
|||
to get the effect of a C-q."
|
||||
(let ((term (getenv "TERM"))
|
||||
hyphend)
|
||||
;; Look for TERM in LOSING-TERMINAL-TYPES.
|
||||
;; If we don't find it literally, try stripping off words
|
||||
;; from the end, one by one.
|
||||
(while (and term (not (member term losing-terminal-types)))
|
||||
;; Strip off last hyphen and what follows, then try again.
|
||||
(if (setq hyphend (string-match "[-_][^-_]+$" term))
|
||||
(setq term (substring term 0 hyphend))
|
||||
(setq term nil)))
|
||||
(if term
|
||||
(progn
|
||||
;; Strip off hyphen and what follows
|
||||
(while (setq hyphend (string-match "[-_][^-_]+$" term))
|
||||
(setq term (substring term 0 hyphend)))
|
||||
(and (member term losing-terminal-types)
|
||||
(enable-flow-control))))))
|
||||
(enable-flow-control))))
|
||||
|
||||
(provide 'flow-ctrl)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue