emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r118263: Fix `eww-current-source' buffer confustion


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] trunk r118263: Fix `eww-current-source' buffer confustion
Date: Sun, 02 Nov 2014 23:02:06 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118263
revision-id: address@hidden
parent: address@hidden
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Mon 2014-11-03 00:02:01 +0100
message:
  Fix `eww-current-source' buffer confustion
  
  * net/eww.el (eww-display-html): Set `eww-current-source' in the
  correct buffer.
  (eww-view-source): Use it.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/eww.el                eww.el-20130610114603-80ap3gwnw4x4m5ix-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-11-02 21:44:04 +0000
+++ b/lisp/ChangeLog    2014-11-02 23:02:01 +0000
@@ -1,3 +1,9 @@
+2014-11-02  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * net/eww.el (eww-display-html): Set `eww-current-source' in the
+       correct buffer.
+       (eww-view-source): Use it.
+
 2014-11-02  Ivan Shmakov <address@hidden>
 
        * net/eww.el (eww): Recognize colon-delimited IPv6 addresses.

=== modified file 'lisp/net/eww.el'
--- a/lisp/net/eww.el   2014-11-02 21:40:30 +0000
+++ b/lisp/net/eww.el   2014-11-02 23:02:01 +0000
@@ -264,10 +264,11 @@
         (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 @@
         (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)))


reply via email to

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