aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-09-13 10:03:24 +0200
committerLars Ingebrigtsen2021-09-13 10:03:28 +0200
commit4ee8b4d225176191bc0778ab9cbe5bb481d4704c (patch)
treee14eec7adb30b2a5cf910d7344f0daa1ddc4ef05
parentbb446c1d968f15c34c74e90f9319c3069bd6e025 (diff)
downloademacs-4ee8b4d225176191bc0778ab9cbe5bb481d4704c.tar.gz
emacs-4ee8b4d225176191bc0778ab9cbe5bb481d4704c.zip
Only do multi-isearch in eww if there's next/prev links
* lisp/net/eww.el (eww-handle-link): Only do multi-isearch if there's a next/prev link in the HTML (bug#50497). (eww-setup-buffer): Clear the function. (eww-mode): Don't set it here.
-rw-r--r--lisp/net/eww.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 62f19925f62..16a13bbaaee 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -668,9 +668,12 @@ Currently this means either text/html or application/xhtml+xml."
668 ("home" . :home) 668 ("home" . :home)
669 ("contents" . :contents) 669 ("contents" . :contents)
670 ("up" . :up))))) 670 ("up" . :up)))))
671 (and href 671 (when (and href where)
672 where 672 (when (memq (cdr where) '(:next :previous))
673 (plist-put eww-data (cdr where) href)))) 673 ;; Multi-page isearch support.
674 (setq-local multi-isearch-next-buffer-function
675 #'eww-isearch-next-buffer))
676 (plist-put eww-data (cdr where) href))))
674 677
675(defvar eww-redirect-level 1) 678(defvar eww-redirect-level 1)
676 679
@@ -840,6 +843,8 @@ Currently this means either text/html or application/xhtml+xml."
840 (remove-overlays) 843 (remove-overlays)
841 (erase-buffer)) 844 (erase-buffer))
842 (setq bidi-paragraph-direction nil) 845 (setq bidi-paragraph-direction nil)
846 ;; May be set later if there's a next/prev link.
847 (setq-local multi-isearch-next-buffer-function nil)
843 (unless (eq major-mode 'eww-mode) 848 (unless (eq major-mode 'eww-mode)
844 (eww-mode))) 849 (eww-mode)))
845 850
@@ -1080,8 +1085,6 @@ the like."
1080 (setq-local tool-bar-map eww-tool-bar-map)) 1085 (setq-local tool-bar-map eww-tool-bar-map))
1081 ;; desktop support 1086 ;; desktop support
1082 (setq-local desktop-save-buffer #'eww-desktop-misc-data) 1087 (setq-local desktop-save-buffer #'eww-desktop-misc-data)
1083 ;; multi-page isearch support
1084 (setq-local multi-isearch-next-buffer-function #'eww-isearch-next-buffer)
1085 (setq truncate-lines t) 1088 (setq truncate-lines t)
1086 (setq-local thing-at-point-provider-alist 1089 (setq-local thing-at-point-provider-alist
1087 (append thing-at-point-provider-alist 1090 (append thing-at-point-provider-alist