emacs-diffs
[Top][All Lists]
Advanced

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

master a488716: Allow opening buttonized URL with secondary browser in r


From: Tassilo Horn
Subject: master a488716: Allow opening buttonized URL with secondary browser in rcirc
Date: Wed, 2 Jun 2021 17:04:58 -0400 (EDT)

branch: master
commit a488716961df851bdad767696003327ae5590394
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>

    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.
---
 lisp/net/browse-url.el | 1 +
 lisp/net/rcirc.el      | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 717a018..8157422 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 7251640..4fdb63e 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)))))



reply via email to

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