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

(enable-flow-control-on): Do nothing if no TERM.

parent e6faba7f
......@@ -102,11 +102,13 @@ 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)
;; 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))))
(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))))))
(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