aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorTassilo Horn2020-05-04 11:24:08 +0200
committerTassilo Horn2020-05-06 10:14:58 +0200
commitc4adfbae24d920f0ce62cb88b988219348d1ec73 (patch)
treeb60ac0e763bc09d50c56795e833fe1a44070f28a /doc
parent58c234aa8cb6e76d377f07cbf0b59f2552eb296b (diff)
downloademacs-c4adfbae24d920f0ce62cb88b988219348d1ec73.tar.gz
emacs-c4adfbae24d920f0ce62cb88b988219348d1ec73.zip
Allow for custom URL handlers in browse-url.
* lisp/net/browse-url.el (browse-url-handlers): New defcustom. (browse-url-default-handlers): New defvar. (browse-url): Use them. Adapt docstring. Issue a warning pointing to browse-url-handlers when browse-url-browser-function is an alist. (browse-url--mailto, browse-url--man): New functions. (browse-url--browser-defcustom-type): Add :doc that the alist usage is deprecated. (browse-url-browser-function): Remove documentation referring to the alist usage and mention browse-url-handlers. * doc/emacs/misc.texi: Document browse-url-handlers in Browse-URL node. * etc/NEWS: Mention browse-url-default-handlers and browse-url-handlers.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/misc.texi13
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 47f195d0b20..d1854f31ff3 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -2920,9 +2920,16 @@ you might like to bind to keys, such as @code{browse-url-at-point} and
2920 You can customize Browse-URL's behavior via various options in the 2920 You can customize Browse-URL's behavior via various options in the
2921@code{browse-url} Customize group. In particular, the option 2921@code{browse-url} Customize group. In particular, the option
2922@code{browse-url-mailto-function} lets you define how to follow 2922@code{browse-url-mailto-function} lets you define how to follow
2923@samp{mailto:} URLs, while @code{browse-url-browser-function} lets you 2923@samp{mailto:} URLs, while @code{browse-url-browser-function}
2924define how to follow other types of URLs. For more information, view 2924specifies your default browser.
2925the package commentary by typing @kbd{C-h P browse-url @key{RET}}. 2925
2926@vindex browse-url-handlers
2927 You can define that certain URLs are browsed with other functions by
2928customizing @code{browse-url-handlers}, an alist of regular
2929expressions paired with functions to browse matching URLs.
2930
2931For more information, view the package commentary by typing @kbd{C-h P
2932browse-url @key{RET}}.
2926 2933
2927@node Goto Address mode 2934@node Goto Address mode
2928@subsection Activating URLs 2935@subsection Activating URLs