emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master f022b1b: Allow 'browse-url-emacs' to fetch URL in t


From: Eli Zaretskii
Subject: [Emacs-diffs] master f022b1b: Allow 'browse-url-emacs' to fetch URL in the selected window
Date: Mon, 19 Mar 2018 05:11:03 -0400 (EDT)

branch: master
commit f022b1bdf885007363518ec1474ef5820ee6b6d6
Author: Pierre Téchoueyres <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 lisp/net/browse-url.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 8086495..3b5169d 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'."
 (defvar url-handler-regexp)
 
 ;;;###autoload
-(defun browse-url-emacs (url &optional _new-window)
+(defun browse-url-emacs (url &optional same-window)
   "Ask Emacs to load URL into a buffer and show it in another window."
   (interactive (browse-url-interactive-arg "URL: "))
   (require 'url-handlers)
   (let ((file-name-handler-alist
          (cons (cons url-handler-regexp 'url-file-handler)
                file-name-handler-alist)))
-    ;; Ignore `new-window': with all other browsers the URL is always shown
-    ;; in another window than the current Emacs one since it's shown in
-    ;; another application's window.
-    ;; (if new-window (find-file-other-window url) (find-file url))
-    (find-file-other-window url)))
+    (if same-window (find-file url) (find-file-other-window url))))
 
 ;;;###autoload
 (defun browse-url-gnome-moz (url &optional new-window)



reply via email to

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