mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
(eww) Reimplement the history functionality
* net/eww.el (eww-back-url): Implement the history by stashing all the data into a list.
This commit is contained in:
parent
c763842b88
commit
e82b099100
@ -1,3 +1,8 @@
|
||||
2013-06-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* net/eww.el (eww-back-url): Implement the history by stashing all
|
||||
the data into a list.
|
||||
|
||||
2013-06-25 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* files-x.el (read-file-local-variable-value): Use read-from-minibuffer
|
||||
|
@ -339,7 +339,9 @@ word(s) will be searched for via `eww-search-prefix'."
|
||||
(defun eww-browse-url (url &optional new-window)
|
||||
(when (and (equal major-mode 'eww-mode)
|
||||
eww-current-url)
|
||||
(push (list eww-current-url (point))
|
||||
(push (list :url eww-current-url
|
||||
:point (point)
|
||||
:text (buffer-string))
|
||||
eww-history))
|
||||
(eww url))
|
||||
|
||||
@ -354,8 +356,12 @@ word(s) will be searched for via `eww-search-prefix'."
|
||||
(interactive)
|
||||
(when (zerop (length eww-history))
|
||||
(error "No previous page"))
|
||||
(let ((prev (pop eww-history)))
|
||||
(url-retrieve (car prev) 'eww-render (list (car prev) (cadr prev)))))
|
||||
(let ((prev (pop eww-history))
|
||||
(inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
(insert (plist-get prev :text))
|
||||
(goto-char (plist-get prev :point))
|
||||
(setq eww-current-url (plist-get prev :url))))
|
||||
|
||||
(defun eww-next-url ()
|
||||
"Go to the page marked `next'.
|
||||
|
Loading…
Reference in New Issue
Block a user