diff lisp/startup.el @ 83800:0505ccaa9eba

(normal-top-level): Set $TERM to `dumb' so that unless stated otherwise, subprocesses do not send back escape sequences corresponding to the terminal from which Emacs was started.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 31 Aug 2007 06:57:25 +0000
parents 27d11c1d4e46
children 5e1dbcacecd3
line wrap: on
line diff
--- a/lisp/startup.el	Fri Aug 31 05:22:22 2007 +0000
+++ b/lisp/startup.el	Fri Aug 31 06:57:25 2007 +0000
@@ -486,7 +486,12 @@
 	     (run-hooks 'window-setup-hook))
 	(or menubar-bindings-done
 	    (if (display-popup-menus-p)
-		(precompute-menubar-bindings)))))))
+		(precompute-menubar-bindings)))))
+    ;; Subprocesses of Emacs do not have direct access to the terminal, so
+    ;; unless told otherwise they should only assume a dumb terminal.
+    ;; We are careful to do it late (after term-setup-hook), although the
+    ;; new multi-tty code does not use $TERM any more there anyway.
+    (setenv "TERM" "dumb")))
 
 ;; Precompute the keyboard equivalents in the menu bar items.
 (defun precompute-menubar-bindings ()