(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)
;;;###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))
(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
(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."
(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 ()