summaryrefslogtreecommitdiff
path: root/lisp/net/eww.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/eww.el')
-rw-r--r--lisp/net/eww.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index d131b2bf8c9..e39a4c33b20 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1050,9 +1050,16 @@ the like."
;; multi-page isearch support
(setq-local multi-isearch-next-buffer-function #'eww-isearch-next-buffer)
(setq truncate-lines t)
+ (setq-local thing-at-point-provider-alist
+ (append thing-at-point-provider-alist
+ '((url . eww--url-at-point))))
(buffer-disable-undo)
(setq buffer-read-only t))
+(defun eww--url-at-point ()
+ "`thing-at-point' provider function."
+ (get-text-property (point) 'shr-url))
+
;;;###autoload
(defun eww-browse-url (url &optional new-window)
"Ask the EWW browser to load URL.