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.
This commit is contained in:
parent
27e4b2be11
commit
816cad6e24
2 changed files with 11 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Add table
Reference in a new issue