summaryrefslogtreecommitdiff
path: root/lisp/startup.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-08-31 06:57:25 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-08-31 06:57:25 +0000
commitfdb884632b37cb99031abd82663f28c3c48aec86 (patch)
tree981b5e5afae6b2fbb32b264b66ab918b46c2a53a /lisp/startup.el
parent3c33c79aaf91eb7ddd6abb247a99ee188495615f (diff)
downloademacs-fdb884632b37cb99031abd82663f28c3c48aec86.tar.gz
(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.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r--lisp/startup.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 1f42285d553..22cce3f8b38 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -486,7 +486,12 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
(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 ()