From: Richard M. Stallman Date: Wed, 10 Apr 1996 05:39:50 +0000 (+0000) Subject: (x-handle-display): Set DISPLAY envvar too. X-Git-Tag: emacs-19.34~883 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d98f0b87e6e06a5c70b57e94e54efbe3570a78be;p=emacs.git (x-handle-display): Set DISPLAY envvar too. --- 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.