emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 4c555e9 1/2: Record the right URL in eww


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 4c555e9 1/2: Record the right URL in eww
Date: Thu, 27 Nov 2014 16:20:05 +0000

branch: master
commit 4c555e9afaf74d513d1fa7717a07abe662594cd3
Author: Lars Magne Ingebrigtsen <address@hidden>
Date:   Thu Nov 27 17:06:26 2014 +0100

    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.
---
 lisp/ChangeLog  |    3 +++
 lisp/net/eww.el |    8 +++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 85748e6..b0b1d74 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2014-11-27  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * net/eww.el (eww): Record the new URL immediately, so that if the
+       HTTP fetch fails, we have the right URL in the buffer.
+
        * dom.el (dom-pp): New function.
 
 2014-11-17  Eli Zaretskii  <address@hidden>
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 10298b1..a8c9109 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]