Function: x-handle-display
x-handle-display is a byte-compiled function defined in
common-win.el.gz.
Signature
(x-handle-display SWITCH)
Documentation
Handle -display DISPLAY option.
Source Code
;; Defined in /usr/src/emacs/lisp/term/common-win.el.gz
(defun x-handle-display (_switch)
"Handle -display DISPLAY option."
(setq x-display-name (pop 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))