diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-10 18:14:44 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-10 18:14:44 +0200 |
commit | bb257ae3cc0feae1f7bf8be03c1abf35800ce962 (patch) | |
tree | 87b28653a0da35fa3f75953ac8c8c8b55b508844 | |
parent | a6d005987d45d742bd6f605932fd71a911648308 (diff) |
autoloads/requires/mode hook in mastodon.el
-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 64aefc0..5e95b35 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -36,6 +36,7 @@ (eval-when-compile (require 'subr-x)) (require 'mastodon-http) (require 'mastodon-toot) +(require 'url) (declare-function discover-add-context-menu "discover") (declare-function emojify-mode "emojify") @@ -95,6 +96,7 @@ (when (require 'lingva nil :no-error) (autoload 'mastodon-toot--translate-toot-text "mastodon-toot")) (autoload 'mastodon-search--trending-tags "mastodon-search") +(autoload 'mastodon-profile-fetch-server-account-settings "mastodon-profile") (defgroup mastodon nil "Interface with Mastodon." @@ -303,8 +305,6 @@ not, just browse the URL in the normal fashion." (defun mastodon--masto-url-p (query) "Check if QUERY resembles a fediverse URL." ;; calqued off https://github.com/tuskyapp/Tusky/blob/c8fc2418b8f5458a817bba221d025b822225e130/app/src/main/java/com/keylesspalace/tusky/BottomSheetActivity.kt - ;; TODO: remove domain and add ^ to regex: - ;; (let ((query-path (url-file-nondirectory query))) (let* ((uri-parsed (url-generic-parse-url query)) (query (url-filename uri-parsed))) (save-match-data @@ -325,6 +325,9 @@ not, just browse the URL in the normal fashion." (when mastodon-toot--enable-custom-instance-emoji (mastodon-toot--enable-custom-emoji))))) +;;;###autoload +(add-hook 'mastodon-mode-hook #'mastodon-profile-fetch-server-account-settings) + (define-derived-mode mastodon-mode special-mode "Mastodon" "Major mode for Mastodon, the federated microblogging network." :group 'mastodon |