emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 01/01: (eww-follow-link): Make going to #targets in


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 01/01: (eww-follow-link): Make going to #targets in the page work again.
Date: Sun, 23 Nov 2014 16:38:06 +0000

branch: master
commit b7278cdccf4651bbaebc6c58e02d0240ab0c68d6
Author: Lars Magne Ingebrigtsen <address@hidden>
Date:   Sun Nov 23 17:37:58 2014 +0100

    (eww-follow-link): Make going to #targets in the page work again.
---
 lisp/ChangeLog  |    1 +
 lisp/net/eww.el |   10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f743575..74fdd42 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -6,6 +6,7 @@
        (eww-display-html): Don't pop the *eww* buffer.
        (eww-display-raw): Ditto.
        (eww-display-image): Ditto.
+       (eww-follow-link): Make going to #targets in the page work again.
 
 2014-11-23  Ivan Shmakov  <address@hidden>
 
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index b4d1486..bad9b55 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."
             (list
              'base (list (cons 'href url))
              (progn
-               (unless (eq charset encode)
+               (when (or (and encode
+                              (not (eq charset encode)))
+                         (not (eq charset 'utf-8)))
                  (condition-case nil
                      (decode-coding-region (point) (point-max)
                                            (or encode charset))
@@ -1319,9 +1321,9 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
      ;; This is a #target url in the same page as the current one.
      ((and (url-target (url-generic-parse-url url))
           (eww-same-page-p url (plist-get eww-data :url)))
-      (eww-save-history)
-      (eww-display-html 'utf-8 url (plist-get eww-data :url)
-                       nil (current-buffer)))
+      (let ((dom (plist-get eww-data :dom)))
+       (eww-save-history)
+       (eww-display-html 'utf-8 url dom nil (current-buffer))))
      (t
       (eww-browse-url url)))))
 



reply via email to

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