]> git.eshelyaron.com Git - emacs.git/commitdiff
browse-url-button-regexp: Recognize gemini: links
authorDaniel Fleischer <danflscr@gmail.com>
Thu, 2 Dec 2021 08:11:21 +0000 (09:11 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 2 Dec 2021 08:11:21 +0000 (09:11 +0100)
Gemini is a relatively new text-based web protocol, similar to
gopher. There's the "elpher" package to browse gopher and gemini
pages. Adding it to the regexp will make Emacs be aware of gemini links,
e.g. in ERC.

* lisp/net/browse-url.el (browse-url-button-regexp): Add support
for the gemini: URL type.

lisp/net/browse-url.el

index 011e43c447b958ec63cb3bca862d52664b728848..d39cc361e56d4d1058532980f9ee180bd0b27836 100644 (file)
@@ -221,7 +221,7 @@ be used instead."
 
 (defcustom browse-url-button-regexp
   (concat
-   "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|"
+   "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|gemini\\|"
    "nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
    "\\(//[-a-z0-9_.]+:[0-9]*\\)?"
    (let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")