diff lisp/flow-ctrl.el @ 5643:860d91d72063

(enable-flow-control-on): Do nothing if no TERM.
author Richard M. Stallman <rms@gnu.org>
date Thu, 20 Jan 1994 15:12:30 +0000
parents 9b694015caec
children 3e1323443b1a
line wrap: on
line diff
--- a/lisp/flow-ctrl.el	Thu Jan 20 14:41:49 1994 +0000
+++ b/lisp/flow-ctrl.el	Thu Jan 20 15:12:30 1994 +0000
@@ -102,11 +102,13 @@
 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)