diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2014-11-27 17:06:26 +0100 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2014-11-27 17:06:26 +0100 |
commit | 4c555e9afaf74d513d1fa7717a07abe662594cd3 (patch) | |
tree | 8116870ed27798a6aa67899738c9ce70f2fab704 /lisp/net/eww.el | |
parent | 2d431afee4061515a593da1f0a29bcd5fb152f07 (diff) | |
download | emacs-4c555e9afaf74d513d1fa7717a07abe662594cd3.tar.gz emacs-4c555e9afaf74d513d1fa7717a07abe662594cd3.tar.bz2 emacs-4c555e9afaf74d513d1fa7717a07abe662594cd3.zip |
Record the right URL in eww
* net/eww.el (eww): Record the new URL immediately, so that if the
HTTP fetch fails, we have the right URL in the buffer.
Diffstat (limited to 'lisp/net/eww.el')
-rw-r--r-- | lisp/net/eww.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 10298b109d1..a8c910945b6 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -255,6 +255,7 @@ word(s) will be searched for via `eww-search-prefix'." (replace-regexp-in-string " " "+" url)))))) (unless (eq major-mode 'eww-mode) (eww-setup-buffer) + (plist-put eww-data :url url) (eww-update-header-line-format) (let ((inhibit-read-only t)) (insert (format "Loading %s..." url)))) @@ -503,11 +504,8 @@ See the `eww-search-prefix' variable for the search engine used." (doc-view-mode))) (goto-char (point-min))) -(defun eww-setup-buffer (&optional buffer) - (switch-to-buffer - (if (buffer-live-p buffer) - buffer - (get-buffer-create "*eww*"))) +(defun eww-setup-buffer () + (switch-to-buffer (get-buffer-create "*eww*")) (let ((inhibit-read-only t)) (remove-overlays) (erase-buffer)) |