]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix `eww-current-source' buffer confustion
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 2 Nov 2014 23:02:01 +0000 (00:02 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 2 Nov 2014 23:02:01 +0000 (00:02 +0100)
* net/eww.el (eww-display-html): Set `eww-current-source' in the
correct buffer.
(eww-view-source): Use it.

lisp/ChangeLog
lisp/net/eww.el

index cee85522c81ae1036913905f54930c73cdc01176..eb37437519840e2550fde3a51711c4eeae28a507 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * net/eww.el (eww-display-html): Set `eww-current-source' in the
+       correct buffer.
+       (eww-view-source): Use it.
+
 2014-11-02  Ivan Shmakov <ivan@siamics.net>
 
        * net/eww.el (eww): Recognize colon-delimited IPv6 addresses.
index 0f0a59241582af82e153a48ca6c6e8634dfe5d26..e4acd69ef4dacf7f710711472ff87846b71969c1 100644 (file)
@@ -264,10 +264,11 @@ word(s) will be searched for via `eww-search-prefix'."
         (or document
             (list
              'base (list (cons 'href url))
-             (libxml-parse-html-region (point) (point-max))))))
-    (setq eww-current-source (buffer-substring (point) (point-max)))
+             (libxml-parse-html-region (point) (point-max)))))
+       (source (buffer-substring (point) (point-max))))
     (eww-setup-buffer)
-    (setq eww-current-dom document)
+    (setq eww-current-source source
+         eww-current-dom document)
     (let ((inhibit-read-only t)
          (after-change-functions nil)
          (shr-target-id (url-target (url-generic-parse-url url)))
@@ -406,7 +407,7 @@ word(s) will be searched for via `eww-search-prefix'."
         (source eww-current-source))
     (with-current-buffer buf
       (delete-region (point-min) (point-max))
-      (insert (or eww-current-source "no source"))
+      (insert (or source "no source"))
       (goto-char (point-min))
       (when (fboundp 'html-mode)
         (html-mode)))