diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-03-09 10:42:29 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-03-09 10:42:29 +0100 |
commit | 2b5b5cdd214be61b91669f143a19a4400f35d8fd (patch) | |
tree | abb4e8c970a521f3372c579029719f50de787e38 /lisp | |
parent | 623e29d6d50e68cf6f8e8714cae92c4b704264a3 (diff) |
roll our own url-at-point fun, in case eww not loaded
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 4928bf1..4667450 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -455,6 +455,10 @@ Calls `mastodon-tl--get-buffer-type', which see." (mastodon-tl--get-buffer-type)))))) (switch-to-buffer choice))) +(defun mastodon--url-at-point () + "`thing-at-point' provider function." + (get-text-property (point) 'shr-url)) + (defun mastodon-mode-hook-fun () "Function to add to `mastodon-mode-hook'." (when (require 'emojify nil :noerror) @@ -467,8 +471,7 @@ Calls `mastodon-tl--get-buffer-type', which see." ;; make `thing-at-point' functions work: (setq-local thing-at-point-provider-alist (append thing-at-point-provider-alist - '((url . eww--url-at-point))))) - + '((url . mastodon--url-at-point))))) ;;;###autoload (add-hook 'mastodon-mode-hook #'mastodon-mode-hook-fun) |