Function: browse-url-default-browser

browse-url-default-browser is a byte-compiled function defined in browse-url.el.gz.

Signature

(browse-url-default-browser URL &rest ARGS)

Documentation

Find a suitable browser and ask it to load URL.

Default to the URL around or before point.

When called interactively, if variable browse-url-new-window-flag is non-nil, load the document in a new window, if possible, otherwise use a random existing one. A non-nil interactive prefix argument reverses the effect of browse-url-new-window-flag.

When called non-interactively, optional second argument ARGS is used instead of browse-url-new-window-flag.

Source Code

;; Defined in /usr/src/emacs/lisp/net/browse-url.el.gz
(defun browse-url-default-browser (url &rest args)
  "Find a suitable browser and ask it to load URL.
Default to the URL around or before point.

When called interactively, if variable `browse-url-new-window-flag' is
non-nil, load the document in a new window, if possible, otherwise use
a random existing one.  A non-nil interactive prefix argument reverses
the effect of `browse-url-new-window-flag'.

When called non-interactively, optional second argument ARGS is used
instead of `browse-url-new-window-flag'."
  (apply
   (cond
    ((memq system-type '(windows-nt ms-dos cygwin))
     'browse-url-default-windows-browser)
    ((memq system-type '(darwin))
     'browse-url-default-macosx-browser)
    ((featurep 'haiku)
     'browse-url-default-haiku-browser)
    ((eq system-type 'android)
     'browse-url-default-android-browser)
    ((and (eq (frame-parameter nil 'window-system) 'pgtk)
          (not browse-url--inhibit-pgtk))
     'browse-url-default-gtk-browser)
    ((browse-url-can-use-xdg-open) 'browse-url-xdg-open)
    ((executable-find browse-url-firefox-program) 'browse-url-firefox)
    ((executable-find browse-url-chromium-program) 'browse-url-chromium)
    ((executable-find browse-url-kde-program) 'browse-url-kde)
    ((executable-find browse-url-chrome-program) 'browse-url-chrome)
    ((executable-find browse-url-webpositive-program) 'browse-url-webpositive)
    ((executable-find browse-url-xterm-program) 'browse-url-text-xterm)
    (t #'eww-browse-url))
   url args))