summaryrefslogtreecommitdiff
path: root/lisp/net/eww.el
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2021-01-30 23:37:19 +0900
committerYuuki Harano <masm+github@masm11.me>2021-01-30 23:37:19 +0900
commit50c76b844bc79309b4f5d9e28a2386b9a6f735b7 (patch)
tree29f8273d8afccae1f16b723c36548cee150cb0bc /lisp/net/eww.el
parent563a0d94c379292bd88e83f18560ed21c497cea9 (diff)
parent96f20120c97a0a329fff81a0cc3747082a8a2c55 (diff)
downloademacs-50c76b844bc79309b4f5d9e28a2386b9a6f735b7.tar.gz
emacs-50c76b844bc79309b4f5d9e28a2386b9a6f735b7.tar.bz2
emacs-50c76b844bc79309b4f5d9e28a2386b9a6f735b7.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
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 4146f33a032..55f5242b93a 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.