Rename the new `browse-url-external-browser' variable
* lisp/net/shr.el (shr-external-browser, shr-browse-url): * lisp/net/eww.el (eww-browse-with-external-browser) (eww-follow-link): * lisp/net/browse-url.el (browse-url-secondary-browser-function) (browse-url-button-open): * lisp/gnus/gnus-sum.el (gnus-summary-browse-url): Rename from `browse-url-external-browser' to `browse-url-secondary-browser-function'.
This commit is contained in:
parent
d7665ae8df
commit
d69e1d7056
7 changed files with 26 additions and 24 deletions
|
@ -187,7 +187,7 @@ switch EWW buffers through a minibuffer prompt, press @kbd{s}
|
|||
(@code{eww-switch-to-buffer}).
|
||||
|
||||
@findex eww-browse-with-external-browser
|
||||
@vindex browse-url-external-browser
|
||||
@vindex browse-url-secondary-browser-function
|
||||
@vindex eww-use-external-browser-for-content-type
|
||||
@kindex &
|
||||
@cindex External Browser
|
||||
|
@ -197,10 +197,10 @@ or are not implemented (E.g., JavaScript). If you have trouble
|
|||
viewing a website with EWW then hit @kbd{&}
|
||||
(@code{eww-browse-with-external-browser}) inside the EWW buffer to
|
||||
open the website in the external browser specified by
|
||||
@code{browse-url-external-browser}. Some content types, such as video or
|
||||
audio content, do not make sense to display in GNU Emacs at all. You
|
||||
can tell EWW to open specific content automatically in an external
|
||||
browser by customizing
|
||||
@code{browse-url-secondary-browser-function}. Some content types,
|
||||
such as video or audio content, do not make sense to display in GNU
|
||||
Emacs at all. You can tell EWW to open specific content automatically
|
||||
in an external browser by customizing
|
||||
@code{eww-use-external-browser-for-content-type}.
|
||||
|
||||
@node Advanced
|
||||
|
|
|
@ -10164,7 +10164,7 @@ do so.
|
|||
@findex gnus-summary-browse-url
|
||||
Scan the article buffer for links, and offer them to the user for
|
||||
browsing with @code{browse-url}. With a prefix argument, browse with
|
||||
@code{browse-url-external-browser} instead.
|
||||
@code{browse-url-secondary-browser-function} instead.
|
||||
|
||||
@end table
|
||||
|
||||
|
|
4
etc/NEWS
4
etc/NEWS
|
@ -770,7 +770,7 @@ links to most ordinary special-mode buffers that display text that
|
|||
have URLs embedded. 'browse-url-button-regexp' controls what's
|
||||
considered a button.
|
||||
|
||||
*** A new variable, 'browse-url-external-browser', has been added.
|
||||
*** A new variable, 'browse-url-secondary-browser-function', has been added.
|
||||
** Comint
|
||||
|
||||
+++
|
||||
|
@ -1045,7 +1045,7 @@ This attribute is meant to tell screen readers to ignore a tag.
|
|||
|
||||
+++
|
||||
*** 'shr-external-browser' has been made into an obsolete alias
|
||||
of 'browse-url-external-browser'.
|
||||
of 'browse-url-secondary-browser-function'.
|
||||
|
||||
---
|
||||
*** 'shr-tag-ol' now respects the ordered list 'start' attribute.
|
||||
|
|
|
@ -9478,7 +9478,7 @@ The 1st element is the widget named by `gnus-collect-urls-primary-text'."
|
|||
"Scan the current article body for links, and offer to browse them.
|
||||
|
||||
Links are opened using `browse-url' unless a prefix argument is
|
||||
given: Then `browse-url-external-browser' is used instead.
|
||||
given: Then `browse-url-secondary-browser-function' is used instead.
|
||||
|
||||
If only one link is found, browse that directly, otherwise use
|
||||
completion to select a link. The first link marked in the
|
||||
|
@ -9502,7 +9502,7 @@ default."
|
|||
(car urls)))))
|
||||
(if target
|
||||
(if external
|
||||
(funcall browse-url-external-browser target)
|
||||
(funcall browse-url-secondary-browser-function target)
|
||||
(browse-url target))
|
||||
(message "No URLs found.")))))
|
||||
|
||||
|
|
|
@ -173,12 +173,12 @@ regexp should probably be \".\" to specify a default browser."
|
|||
:type browse-url--browser-defcustom-type
|
||||
:version "24.1")
|
||||
|
||||
(defcustom browse-url-external-browser 'browse-url-default-browser
|
||||
"Function used to launch an external browser.
|
||||
This can actually be any browser, internal or external, used as
|
||||
the secondary browser choice, and is typically used when giving a
|
||||
prefix argument to the URL-opening command (in those modes that
|
||||
support this (for instance, eww/shr)."
|
||||
(defcustom browse-url-secondary-browser-function 'browse-url-default-browser
|
||||
"Function used to launch an alternative browser.
|
||||
This should usually be an external browser (that is, not eww or
|
||||
w3m), used as the secondary browser choice, and is typically used
|
||||
when giving a prefix argument to the URL-opening command (in
|
||||
those modes that support this (for instance, eww/shr)."
|
||||
:version "27.1"
|
||||
:type browse-url--browser-defcustom-type)
|
||||
|
||||
|
@ -1687,7 +1687,7 @@ external browser instead of the default one."
|
|||
(unless url
|
||||
(error "No URL under point"))
|
||||
(if external
|
||||
(funcall browse-url-external-browser url)
|
||||
(funcall browse-url-secondary-browser-function url)
|
||||
(browse-url url))))
|
||||
|
||||
(defun browse-url-button-copy ()
|
||||
|
|
|
@ -1501,14 +1501,16 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
|
|||
|
||||
(defun eww-browse-with-external-browser (&optional url)
|
||||
"Browse the current URL with an external browser.
|
||||
The browser to used is specified by the `browse-url-external-browser' variable."
|
||||
The browser to used is specified by the
|
||||
`browse-url-secondary-browser-function' variable."
|
||||
(interactive)
|
||||
(funcall browse-url-external-browser (or url (plist-get eww-data :url))))
|
||||
(funcall browse-url-secondary-browser-function
|
||||
(or url (plist-get eww-data :url))))
|
||||
|
||||
(defun eww-follow-link (&optional external mouse-event)
|
||||
"Browse the URL under point.
|
||||
If EXTERNAL is single prefix, browse the URL using
|
||||
`browse-url-external-browser'.
|
||||
`browse-url-secondary-browser-function'.
|
||||
|
||||
If EXTERNAL is double prefix, browse in new buffer."
|
||||
(interactive (list current-prefix-arg last-nonmenu-event))
|
||||
|
@ -1520,7 +1522,7 @@ If EXTERNAL is double prefix, browse in new buffer."
|
|||
((string-match "^mailto:" url)
|
||||
(browse-url-mail url))
|
||||
((and (consp external) (<= (car external) 4))
|
||||
(funcall browse-url-external-browser url)
|
||||
(funcall browse-url-secondary-browser-function url)
|
||||
(shr--blink-link))
|
||||
;; This is a #target url in the same page as the current one.
|
||||
((and (url-target (url-generic-parse-url url))
|
||||
|
|
|
@ -112,7 +112,7 @@ Alternative suggestions are:
|
|||
:type 'string)
|
||||
|
||||
(define-obsolete-variable-alias 'shr-external-browser
|
||||
'browse-url-external-browser "27.1")
|
||||
'browse-url-secondary-browser-function "27.1")
|
||||
|
||||
(defcustom shr-image-animate t
|
||||
"Non nil means that images that can be animated will be."
|
||||
|
@ -954,7 +954,7 @@ size, and full-buffer size."
|
|||
(defun shr-browse-url (&optional external mouse-event)
|
||||
"Browse the URL at point using `browse-url'.
|
||||
If EXTERNAL is non-nil (interactively, the prefix argument), browse
|
||||
the URL using `browse-url-external-browser'.
|
||||
the URL using `browse-url-secondary-browser-function'.
|
||||
If this function is invoked by a mouse click, it will browse the URL
|
||||
at the position of the click. Optional argument MOUSE-EVENT describes
|
||||
the mouse click event."
|
||||
|
@ -969,7 +969,7 @@ the mouse click event."
|
|||
(t
|
||||
(if external
|
||||
(progn
|
||||
(funcall browse-url-external-browser url)
|
||||
(funcall browse-url-secondary-browser-function url)
|
||||
(shr--blink-link))
|
||||
(browse-url url))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue