Function: browse-url-process-environment

browse-url-process-environment is a byte-compiled function defined in browse-url.el.gz.

Signature

(browse-url-process-environment)

Documentation

Set DISPLAY in the environment to the X display the browser will use.

This is either the value of variable browse-url-browser-display if non-nil, or the same display as Emacs if different from the current environment, otherwise just use the current environment.

Source Code

;; Defined in /usr/src/emacs/lisp/net/browse-url.el.gz
(defun browse-url-process-environment ()
  "Set DISPLAY in the environment to the X display the browser will use.
This is either the value of variable `browse-url-browser-display' if
non-nil, or the same display as Emacs if different from the current
environment, otherwise just use the current environment."
  (let ((display (or browse-url-browser-display (browse-url-emacs-display))))
    (if display
	(cons (concat (if (and (eq window-system 'pgtk)
                               (equal (pgtk-backend-display-class)
                                      "GdkWaylandDisplay"))
                          "WAYLAND_DISPLAY="
                        "DISPLAY=")
                      display)
              process-environment)
      process-environment)))