[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/browse-url-handlers 9235f1a: Update browse-url documentation.

From: Tassilo Horn
Subject: feature/browse-url-handlers 9235f1a: Update browse-url documentation.
Date: Wed, 6 May 2020 04:04:03 -0400 (EDT)

branch: feature/browse-url-handlers
commit 9235f1a6063464bb9be04c376d46f8211a4f5aa2
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Update browse-url documentation.
    * doc/emacs/misc.texi: Document browse-url-handlers in Browse-URL
    * etc/NEWS: Mention browse-url-default-handlers and
 doc/emacs/misc.texi |  5 +++++
 etc/NEWS            | 16 ++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 47f195d..9be4ee7 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -2924,6 +2924,11 @@ you might like to bind to keys, such as 
@code{browse-url-at-point} and
 define how to follow other types of URLs.  For more information, view
 the package commentary by typing @kbd{C-h P browse-url @key{RET}}.
+@vindex browse-url-handlers
+  You can define that certain URLs are browsed with other functions by
+customizing @code{browse-url-handlers}, an alist of regular
+expressions paired with functions to browse matching URLs.
 @node Goto Address mode
 @subsection Activating URLs
 @findex goto-address-mode
diff --git a/etc/NEWS b/etc/NEWS
index 0f4b624..ac93a76 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -304,6 +304,22 @@ use ‘doxygen’ by default one might evaluate:
                     (c++-mode  . doxygen)))
 or use it in a custom ‘c-style’.
+** browse-url
+*** Added support for custom URL handlers
+There is a new defvar 'browse-url-default-handlers' and a defcustom
+'browse-url-handlers' being alists with (REGEXP . FUNCTION) entries
+allowing to define different browsing FUNCTIONs depending on the URL
+to be browsed.  The defvar is for default handlers provided by Emacs
+itself or external packages, the defcustom is for the user (and allows
+for overriding the default handlers).
+Formerly, one could do the same by setting
+'browse-url-browser-function' to such an alist.  This usage is still
+supported but deprecated.
 * New Modes and Packages in Emacs 28.1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]