* doc/misc/eww.texi (Advanced): Document it (bug#44783).
* lisp/net/eww.el (eww-use-browse-url): New variable.
(eww-follow-link): Use it.
retrieving these images'' and @code{t} means ``always send cookies
when retrieving these images''.
+@vindex eww-use-browse-url
+ When following links in EWW, @acronym{URL}s that match the
+@code{eww-use-browse-url} regexp will be passed to @code{browse-url}
+instead of EWW handling them itself. The action can be further
+customized by altering @code{browse-url-handlers}.
+
@vindex eww-header-line-format
@cindex Header
The header line of the EWW buffer can be changed by customizing
** EWW
++++
+*** New user option 'eww-use-browse-url'.
+This is a regexp that can be set to alter how links are followed in eww.
+
+++
*** New user option 'eww-retrieve-command'.
This can be used to download data via an external command. If nil
:group 'eww
:type 'string)
+(defcustom eww-use-browse-url "\\`mailto:"
+ "eww will use `browse-url' when following links that match this regexp.
+The action to be taken can further be customized via
+`browse-url-handlers'."
+ :version "28.1"
+ :type 'regexp)
+
(defun erc--download-directory ()
"Return the name of the download directory.
If ~/Downloads/ exists, that will be used, and if not, the
(cond
((not url)
(message "No link under point"))
- ((string-match-p "\\`mailto:" url)
+ ((string-match-p eww-use-browse-url url)
;; This respects the user options `browse-url-handlers'
;; and `browse-url-mailto-function'.
(browse-url url))