]> git.eshelyaron.com Git - emacs.git/commitdiff
(enable-flow-control-on): Do nothing if no TERM.
authorRichard M. Stallman <rms@gnu.org>
Thu, 20 Jan 1994 15:12:30 +0000 (15:12 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 20 Jan 1994 15:12:30 +0000 (15:12 +0000)
lisp/flow-ctrl.el

index ec76e29bfdfd8c0b6e20464b04ca2aac5362da85..3e271510ff501b903261d6d93d76601aeaccafa1 100644 (file)
@@ -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)