From: Karl Heuer Date: Thu, 21 Dec 1995 17:43:20 +0000 (+0000) Subject: (enable-flow-control-on): Try the whole TERM name X-Git-Tag: emacs-19.34~2064 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=409adbc7fbb0c8e894f290a25dea20daf18c5f77;p=emacs.git (enable-flow-control-on): Try the whole TERM name before trying to strip off words from the end. --- 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)