Function: browse-url-chrome

browse-url-chrome is an interactive and byte-compiled function defined in browse-url.el.gz.

Signature

(browse-url-chrome URL &optional NEW-WINDOW)

Documentation

Ask the Google Chrome WWW browser to load URL.

Default to the URL around or before point. Invokes the program specified by browse-url-chrome-program. Passes to that program the strings in variable browse-url-chrome-arguments.

Interactively, if the variable browse-url-new-window-flag is non-nil, loads the document in a new Chrome window. A non-nil prefix argument reverses the effect of browse-url-new-window-flag.

Non-interactively, this uses the optional second argument NEW-WINDOW instead of browse-url-new-window-flag.

Probably introduced at or before Emacs version 32.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/browse-url.el.gz
(defun browse-url-chrome (url &optional new-window)
  "Ask the Google Chrome WWW browser to load URL.
Default to the URL around or before point.  Invokes the program
specified by `browse-url-chrome-program'.  Passes to that program
the strings in variable `browse-url-chrome-arguments'.

Interactively, if the variable `browse-url-new-window-flag' is non-nil,
loads the document in a new Chrome window.  A non-nil prefix argument
reverses the effect of `browse-url-new-window-flag'.

Non-interactively, this uses the optional second argument NEW-WINDOW
instead of `browse-url-new-window-flag'."
  (interactive (browse-url-interactive-arg "URL: "))
  (setq url (browse-url-encode-url url))
  (let* ((process-environment (browse-url-process-environment)))
    (apply #'start-process
	   (concat "google-chrome " url) nil
	   browse-url-chrome-program
	   (append browse-url-chrome-arguments
                   (and new-window '("--new-window"))
                   (list url)))))