+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.
(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)))
(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)))