Commit 6c12691a authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Always save eww history

* eww.el (eww-setup-buffer): Always save history, even when
called from outside the eww buffer (bug#19638).

Backport:

(cherry picked from commit 2a0f18d9)
parent 1a99bd69
......@@ -274,17 +274,13 @@ 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))))))
(if (eq major-mode 'eww-mode)
(when (or (plist-get eww-data :url)
(plist-get eww-data :dom))
(eww-save-history))
(eww-setup-buffer)
(plist-put eww-data :url url)
(plist-put eww-data :title "")
(eww-update-header-line-format)
(let ((inhibit-read-only t))
(insert (format "Loading %s..." url))
(goto-char (point-min))))
(eww-setup-buffer)
(plist-put eww-data :url url)
(plist-put eww-data :title "")
(eww-update-header-line-format)
(let ((inhibit-read-only t))
(insert (format "Loading %s..." url))
(goto-char (point-min)))
(url-retrieve url 'eww-render
(list url nil (current-buffer))))
......@@ -536,6 +532,9 @@ Currently this means either text/html or application/xhtml+xml."
(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))
(let ((inhibit-read-only t))
(remove-overlays)
(erase-buffer))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment