From 787e432ca387827a5feb3760dc0ee043a86a3207 Mon Sep 17 00:00:00 2001 From: Johnson Denen Date: Sat, 8 Apr 2017 14:09:36 -0400 Subject: Move entry functions to mastodon.el --- lisp/mastodon-toot.el | 7 ------- lisp/mastodon.el | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index eb82f12..7744cdd 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -5,13 +5,6 @@ "Capture Mastodon toots." :group 'mastodon) -(defun mastodon-new-toot () - "Updates a Mastodon instance with new toot. Content is captured in a new buffer." - (interactive) - (progn - (switch-to-buffer-other-window (get-buffer-create "*new toot*")) - (mastodon-toot-mode t))) - (defun mastodon-toot--send-triage (status) "Callback function to triage toot POST. diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 424f758..2c68951 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -14,10 +14,20 @@ (defvar mastodon--api-version "v1") ;;;###autoload -(defun mastodon () +(defun mastodon-toot () + "Updates a Mastodon instance with new toot. Content is captured in a new buffer." (interactive) - (load-file "mastodon-http.el") - (load-file "mastodon-auth.el") - (load-file "mastodon-toot.el")) + (progn + (require 'mastodon-toot) + (switch-to-buffer-other-window (get-buffer-create "*new toot*")) + (mastodon-toot-mode t))) + +;;;###autoload +(defun mastodon-register () + "Registers mastodon.el with the Mastodon instance." + (interactive) + (progn + (require 'mastodon-auth) + (mastodon--store-client-id-and-secret))) (provide 'mastodon) -- cgit v1.2.3