Function: eww-switch-to-buffer
eww-switch-to-buffer is an interactive and byte-compiled function
defined in eww.el.gz.
Signature
(eww-switch-to-buffer)
Documentation
Prompt for an EWW buffer to display in the selected window.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
(defun eww-switch-to-buffer ()
"Prompt for an EWW buffer to display in the selected window."
(interactive nil eww-mode)
(let ((completion-extra-properties
`(:annotation-function
,(lambda (buf)
(with-current-buffer buf
(format " %s" (eww-current-url))))))
(curbuf (current-buffer)))
(pop-to-buffer-same-window
(read-buffer "Switch to EWW buffer: "
(cl-loop for buf in (nreverse (buffer-list))
if (with-current-buffer buf (derived-mode-p 'eww-mode))
return buf)
t
(lambda (bufn)
(setq bufn (if (consp bufn) (cdr bufn) (get-buffer bufn)))
(and (with-current-buffer bufn
(derived-mode-p 'eww-mode))
(not (eq bufn curbuf))))))))