summaryrefslogtreecommitdiff
path: root/lisp/flow-ctrl.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1995-12-21 17:43:20 +0000
committerKarl Heuer <kwzh@gnu.org>1995-12-21 17:43:20 +0000
commit53dc0066094459d0bc92ea3882f6cfa0bdb75425 (patch)
tree9adf8a82f1074953646cc0b85cfa6b33bba9cbdc /lisp/flow-ctrl.el
parent3e10ebf76d36b0d9cdd86580525e1154ecaf5287 (diff)
downloademacs-53dc0066094459d0bc92ea3882f6cfa0bdb75425.tar.gz
(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.el15
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-^
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)