# HG changeset patch # User Karl Heuer # Date 819567800 0 # Node ID 116a22176b3692853948c01e537b5a269d703244 # Parent 7665c242201192045d658596015d0c8b2435ed58 (enable-flow-control-on): Try the whole TERM name before trying to strip off words from the end. diff -r 7665c2422011 -r 116a22176b36 lisp/flow-ctrl.el --- a/lisp/flow-ctrl.el Thu Dec 21 17:40:55 1995 +0000 +++ b/lisp/flow-ctrl.el Thu Dec 21 17:43:20 1995 +0000 @@ -113,13 +113,16 @@ 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)