aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2014-11-23 17:37:58 +0100
committerLars Magne Ingebrigtsen2014-11-23 17:37:58 +0100
commitb7278cdccf4651bbaebc6c58e02d0240ab0c68d6 (patch)
treeeee9a0c2463239ff2ffd6c4243513613c407ce64 /lisp
parent6fd82d61a2b82e772e8cde0e04516f5c3ca98ed3 (diff)
downloademacs-b7278cdccf4651bbaebc6c58e02d0240ab0c68d6.tar.gz
emacs-b7278cdccf4651bbaebc6c58e02d0240ab0c68d6.zip
(eww-follow-link): Make going to #targets in the page work again.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog1
-rw-r--r--lisp/net/eww.el10
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f743575b8ec..74fdd42bdfe 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -6,6 +6,7 @@
6 (eww-display-html): Don't pop the *eww* buffer. 6 (eww-display-html): Don't pop the *eww* buffer.
7 (eww-display-raw): Ditto. 7 (eww-display-raw): Ditto.
8 (eww-display-image): Ditto. 8 (eww-display-image): Ditto.
9 (eww-follow-link): Make going to #targets in the page work again.
9 10
102014-11-23 Ivan Shmakov <ivan@siamics.net> 112014-11-23 Ivan Shmakov <ivan@siamics.net>
11 12
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index b4d1486340f..bad9b559384 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -359,7 +359,9 @@ See the `eww-search-prefix' variable for the search engine used."
359 (list 359 (list
360 'base (list (cons 'href url)) 360 'base (list (cons 'href url))
361 (progn 361 (progn
362 (unless (eq charset encode) 362 (when (or (and encode
363 (not (eq charset encode)))
364 (not (eq charset 'utf-8)))
363 (condition-case nil 365 (condition-case nil
364 (decode-coding-region (point) (point-max) 366 (decode-coding-region (point) (point-max)
365 (or encode charset)) 367 (or encode charset))
@@ -1319,9 +1321,9 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
1319 ;; This is a #target url in the same page as the current one. 1321 ;; This is a #target url in the same page as the current one.
1320 ((and (url-target (url-generic-parse-url url)) 1322 ((and (url-target (url-generic-parse-url url))
1321 (eww-same-page-p url (plist-get eww-data :url))) 1323 (eww-same-page-p url (plist-get eww-data :url)))
1322 (eww-save-history) 1324 (let ((dom (plist-get eww-data :dom)))
1323 (eww-display-html 'utf-8 url (plist-get eww-data :url) 1325 (eww-save-history)
1324 nil (current-buffer))) 1326 (eww-display-html 'utf-8 url dom nil (current-buffer))))
1325 (t 1327 (t
1326 (eww-browse-url url))))) 1328 (eww-browse-url url)))))
1327 1329