From: Lars Ingebrigtsen Date: Wed, 3 Feb 2016 02:35:10 +0000 (+1100) Subject: Use pop-to-buffer-same-window in eww X-Git-Tag: emacs-25.0.91~108 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6191003fcd2bc65f2b18d5337f6f390d43f07173;p=emacs.git Use pop-to-buffer-same-window in eww * lisp/net/eww.el: pop-to-buffer-same-window throughout instead of switch-to-buffer (bug#22244). --- diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 7f98b5b8c7b..af6e0afdfa7 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -551,7 +551,7 @@ Currently this means either text/html or application/xhtml+xml." (declare-function mailcap-view-mime "mailcap" (type)) (defun eww-display-pdf () (let ((data (buffer-substring (point) (point-max)))) - (switch-to-buffer (get-buffer-create "*eww pdf*")) + (pop-to-buffer-same-window (get-buffer-create "*eww pdf*")) (let ((coding-system-for-write 'raw-text) (inhibit-read-only t)) (erase-buffer) @@ -748,7 +748,7 @@ the like." ;;;###autoload (defun eww-browse-url (url &optional new-window) (when new-window - (switch-to-buffer (generate-new-buffer "*eww*")) + (pop-to-buffer-same-window (generate-new-buffer "*eww*")) (eww-mode)) (eww url)) @@ -1728,7 +1728,7 @@ If CHARSET is nil then use UTF-8." (let ((buffer eww-current-buffer)) (quit-window) (when buffer - (switch-to-buffer buffer))) + (pop-to-buffer-same-window buffer))) (eww-restore-history history))) (defvar eww-history-mode-map @@ -1809,7 +1809,7 @@ If CHARSET is nil then use UTF-8." (unless buffer (error "No buffer on current line")) (quit-window) - (switch-to-buffer buffer))) + (pop-to-buffer-same-window buffer))) (defun eww-buffer-show () "Display buffer under point in eww buffer list." @@ -1818,7 +1818,7 @@ If CHARSET is nil then use UTF-8." (unless buffer (error "No buffer on current line")) (other-window -1) - (switch-to-buffer buffer) + (pop-to-buffer-same-window buffer) (other-window 1))) (defun eww-buffer-show-next ()