summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-12-09 16:08:16 +0800
committerJSDurand <mmemmew@gmail.com>2021-12-09 16:08:16 +0800
commitb8a41223280fd6cc0e74f40bb3ef52bdfffe7df9 (patch)
treeb21064daba4d329d636988d6908fc0a8effaa288
parent8416e814e4426aa688af8be7d4be3150be33ea66 (diff)
eww-conf: modify the depth of a hook
* eww-conf.el (eww-after-render-hook, durand-eww-bookmark-jump): make sure this hook is added after the hook that sets the readable mode to nil, so that the readable mode is correctly set to t after a jump.
-rw-r--r--eww-conf.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/eww-conf.el b/eww-conf.el
index 1f6ff46..a8fbd62 100644
--- a/eww-conf.el
+++ b/eww-conf.el
@@ -415,7 +415,7 @@ For the meanings of NAME and DIR, see the documentation of
"Set `durand-eww-readable-p' to t."
(setq-local durand-eww-readable-p t))
-(add-hook 'eww-after-render-hook #'eww-non-readable-h)
+(add-hook 'eww-after-render-hook #'eww-non-readable-h -10)
(advice-add #'eww-readable :after #'eww-readable-h)
@@ -560,7 +560,10 @@ Otherwise, fetch URL and afterwards try to restore the point."
(list
"" (cons 'buffer buffer)
front rear position))))
- (add-hook 'eww-after-render-hook function-symbol))))))
+ ;; make sure this hook is added after the hook that sets
+ ;; the readable mode to nil, so that the readable mode is
+ ;; correctly set to t.
+ (add-hook 'eww-after-render-hook function-symbol 10))))))
((user-error "Cannot jump to this bookmark")))))
(provide 'eww-conf)