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.
This commit is contained in:
Tassilo Horn 2021-06-02 23:02:45 +02:00
parent 09081ca119
commit a488716961
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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)))))