aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Téchoueyres2018-03-01 22:22:05 +0100
committerEli Zaretskii2018-03-19 11:09:24 +0200
commitf022b1bdf885007363518ec1474ef5820ee6b6d6 (patch)
tree3e3224dd487781e9bb22e47a59bec2bee1258be5
parent2db57579b08ac99c464b6d3698648b3167fc5d55 (diff)
downloademacs-f022b1bdf885007363518ec1474ef5820ee6b6d6.tar.gz
emacs-f022b1bdf885007363518ec1474ef5820ee6b6d6.zip
Allow 'browse-url-emacs' to fetch URL in the selected window
* lisp/net/browse-url.el (browse-url-emacs): Use same-window argument. (Bug#30673)
-rw-r--r--lisp/net/browse-url.el8
1 files changed, 2 insertions, 6 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 8086495aaaa..3b5169d4734 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1242,18 +1242,14 @@ used instead of `browse-url-new-window-flag'."
1242(defvar url-handler-regexp) 1242(defvar url-handler-regexp)
1243 1243
1244;;;###autoload 1244;;;###autoload
1245(defun browse-url-emacs (url &optional _new-window) 1245(defun browse-url-emacs (url &optional same-window)
1246 "Ask Emacs to load URL into a buffer and show it in another window." 1246 "Ask Emacs to load URL into a buffer and show it in another window."
1247 (interactive (browse-url-interactive-arg "URL: ")) 1247 (interactive (browse-url-interactive-arg "URL: "))
1248 (require 'url-handlers) 1248 (require 'url-handlers)
1249 (let ((file-name-handler-alist 1249 (let ((file-name-handler-alist
1250 (cons (cons url-handler-regexp 'url-file-handler) 1250 (cons (cons url-handler-regexp 'url-file-handler)
1251 file-name-handler-alist))) 1251 file-name-handler-alist)))
1252 ;; Ignore `new-window': with all other browsers the URL is always shown 1252 (if same-window (find-file url) (find-file-other-window url))))
1253 ;; in another window than the current Emacs one since it's shown in
1254 ;; another application's window.
1255 ;; (if new-window (find-file-other-window url) (find-file url))
1256 (find-file-other-window url)))
1257 1253
1258;;;###autoload 1254;;;###autoload
1259(defun browse-url-gnome-moz (url &optional new-window) 1255(defun browse-url-gnome-moz (url &optional new-window)