]> git.eshelyaron.com Git - emacs.git/commitdiff
(x-handle-display): Set DISPLAY envvar too.
authorRichard M. Stallman <rms@gnu.org>
Wed, 10 Apr 1996 05:39:50 +0000 (05:39 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 10 Apr 1996 05:39:50 +0000 (05:39 +0000)
lisp/term/x-win.el

index b6f753b6201ab461a98839e31e1fc8deaface820..f9c78f5af01f5e79c5dd997248f96f2e689dae7a 100644 (file)
 
 (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.