From b8a41223280fd6cc0e74f40bb3ef52bdfffe7df9 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Thu, 9 Dec 2021 16:08:16 +0800 Subject: 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. --- eww-conf.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'eww-conf.el') 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) -- cgit v1.2.3-18-g5258