From: Lars Ingebrigtsen Date: Tue, 2 Feb 2016 04:53:39 +0000 (+1100) Subject: Make eww-browse-url with new-window parameter work again X-Git-Tag: emacs-25.0.91~121 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ee0fbd854f452ef268de76892ed6b671c91f6d48;p=emacs.git Make eww-browse-url with new-window parameter work again * eww.el (eww-browse-url): Stay in the same buffer if we're already in a eww mode buffer so that eww-browse-url with a new-window parameter works (bug#22244). --- diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 372b674ecd7..128752a62ef 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -274,6 +274,10 @@ word(s) will be searched for via `eww-search-prefix'." (setq url (concat url "/")))) (setq url (concat eww-search-prefix (replace-regexp-in-string " " "+" url)))))) + (switch-to-buffer + (if (eq major-mode 'eww-mode) + (current-buffer) + (get-buffer-create "*eww*"))) (eww-setup-buffer) (plist-put eww-data :url url) (plist-put eww-data :title "") @@ -556,7 +560,6 @@ Currently this means either text/html or application/xhtml+xml." (goto-char (point-min))) (defun eww-setup-buffer () - (switch-to-buffer (get-buffer-create "*eww*")) (when (or (plist-get eww-data :url) (plist-get eww-data :dom)) (eww-save-history))