From: Tassilo Horn Date: Wed, 2 Jun 2021 21:02:45 +0000 (+0200) Subject: Allow opening buttonized URL with secondary browser in rcirc X-Git-Tag: emacs-28.0.90~2218 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a488716961df851bdad767696003327ae5590394;p=emacs.git Allow opening buttonized URL with secondary browser in rcirc * lisp/net/browse-url.el (browse-url-button-open-url): Add autoload cookie. * lisp/net/rcirc.el (rcirc-markup-urls): Use `browse-url-button-open-url' instead of just `browse-url' in order to be able to use the secondary browser by giving a prefix arg. --- diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 717a0185984..8157422d6f0 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1782,6 +1782,7 @@ external browser instead of the default one." (funcall browse-url-secondary-browser-function url) (browse-url url)))) +;;;###autoload (defun browse-url-button-open-url (url) "Open URL using `browse-url'. If `current-prefix-arg' is non-nil, use diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 7251640bf27..4fdb63e2eb6 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2502,7 +2502,8 @@ If ARG is given, opens the URL in a new browser window." 'follow-link t 'rcirc-url url 'action (lambda (button) - (browse-url (button-get button 'rcirc-url)))) + (browse-url-button-open-url + (button-get button 'rcirc-url)))) ;; Record the URL if it is not already the latest stored URL. (unless (string= url (caar rcirc-urls)) (push (cons url start) rcirc-urls)))))