summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-04-10 05:39:50 +0000
committerRichard M. Stallman <rms@gnu.org>1996-04-10 05:39:50 +0000
commit696c27601366614168ca87774f17f0333a948906 (patch)
treea8563ab6f6e5f8efe090a8c82c28042cb77d24ad
parent26aae9d3f66f9f76be664bcc07f8cbc836bd0b78 (diff)
downloademacs-696c27601366614168ca87774f17f0333a948906.tar.gz
(x-handle-display): Set DISPLAY envvar too.
-rw-r--r--lisp/term/x-win.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index b6f753b6201..f9c78f5af01 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -149,7 +149,12 @@
(defun x-handle-display (switch)
(setq x-display-name (car x-invocation-args)
- x-invocation-args (cdr x-invocation-args)))
+ x-invocation-args (cdr x-invocation-args))
+ ;; Make subshell programs see the same DISPLAY value Emacs really uses.
+ ;; Note that this isn't completely correct, since Emacs can use
+ ;; multiple displays. However, there is no way to tell an already
+ ;; running subshell which display the user is currently typing on.
+ (setenv "DISPLAY" x-display-name))
(defun x-handle-args (args)
"Process the X-related command line options in ARGS.