X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Feww.el;h=aa23e97dab8133ec00ab54acb16d2107576a0208;hp=cca59f9c226f5200a914fe4dc1ecbfca5eb233ea;hb=6ef0ffdc7ea83a4a06849bc560e282aca5222c51;hpb=b0596d0e30e0e8ec1c36b70921b7cae9003de5e9 diff --git a/lisp/eww.el b/lisp/eww.el index cca59f9c2..aa23e97da 100644 --- a/lisp/eww.el +++ b/lisp/eww.el @@ -72,6 +72,9 @@ (when redirect (setq url redirect))) (let* ((headers (eww-parse-headers)) + (shr-target-id + (and (string-match "#\\(.*\\)" url) + (match-string 1 url))) (content-type (mail-header-parse-content-type (or (cdr (assoc "content-type" headers)) @@ -92,8 +95,14 @@ (eww-display-image)) (t (eww-display-raw charset))) - (when point - (goto-char point))) + (cond + (point + (goto-char point)) + (shr-target-id + (let ((point (next-single-property-change + (point-min) 'shr-target-id))) + (when point + (goto-char (1+ point))))))) (kill-buffer data-buffer)))) (defun eww-parse-headers ()