aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon.el')
-rw-r--r--lisp/mastodon.el37
1 files changed, 15 insertions, 22 deletions
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index b75c608..6e3a5dc 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -30,8 +30,20 @@
;; it is a labor of love.
;;; Code:
-
-(require 'mastodon-auth nil t)
+(declare-function discover-add-context-menu "discover")
+(declare-function emojify-mode "emojify")
+(autoload 'mastodon-tl--get-federated-timeline "mastodon-tl")
+(autoload 'mastodon-tl--get-home-timeline "mastodon-tl")
+(autoload 'mastodon-tl--get-local-timeline "mastodon-tl")
+(autoload 'mastodon-tl--get-tag-timeline "mastodon-tl")
+(autoload 'mastodon-tl--goto-next-toot "mastodon-tl")
+(autoload 'mastodon-tl--goto-prev-toot "mastodon-tl")
+(autoload 'mastodon-tl--thread "mastodon-tl")
+(autoload 'mastodon-tl--update "mastodon-tl")
+(autoload 'mastodon-toot--compose-buffer "mastodon-toot")
+(autoload 'mastodon-toot--reply "mastodon-toot")
+(autoload 'mastodon-toot--toggle-boost "mastodon-toot")
+(autoload 'mastodon-toot--toggle-favourite "mastodon-toot")
(defgroup mastodon nil
"Interface with Mastodon."
@@ -43,11 +55,6 @@
:group 'mastodon
:type 'string)
-(defcustom mastodon-token-file (concat user-emacs-directory "mastodon.plstore")
- "File path where Mastodon access tokens are stored."
- :group 'mastodon
- :type 'file)
-
(defcustom mastodon-toot-timestamp-format "%F %T"
"Format to use for timestamps.
@@ -57,22 +64,10 @@ Use. e.g. \"%c\" for your locale's date and time format."
:group 'mastodon
:type 'string)
-(defcustom mastodon-avatar-height 30
- "Height of the user avatar images (if shown)."
- :group 'mastodon
- :type 'integer)
-
-(defcustom mastodon-preview-max-height 250
- "Max height of any media attachment preview to be shown."
- :group 'mastodon
- :type 'integer)
-
(defvar mastodon-mode-map
(make-sparse-keymap)
"Keymap for `mastodon-mode'.")
-(defvar mastodon--api-version "v1")
-
(defcustom mastodon-mode-hook nil
"Hook run when entering Mastodon mode."
:type 'hook
@@ -103,8 +98,7 @@ Use. e.g. \"%c\" for your locale's date and time format."
(defun mastodon ()
"Connect Mastodon client to `mastodon-instance-url' instance."
(interactive)
- (require 'mastodon-tl nil t)
- (mastodon-tl--get "home"))
+ (mastodon-tl--get-home-timeline))
;;;###autoload
(defun mastodon-toot (&optional user reply-to-id)
@@ -113,7 +107,6 @@ Use. e.g. \"%c\" for your locale's date and time format."
If USER is non-nil, insert after @ symbol to begin new toot.
If REPLY-TO-ID is non-nil, attach new toot to a conversation."
(interactive)
- (require 'mastodon-toot nil t)
(mastodon-toot--compose-buffer user reply-to-id))
;;;###autoload