aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authorHolger Dürer <me@hdurer.net>2017-05-16 21:09:58 +0100
committerJohnson Denen <johnson.denen@gmail.com>2017-05-18 10:21:21 -0400
commitfe8e4386eacb358df0e16dc5bd37dde4f4d6d57c (patch)
tree2329c867ca4d8434e6e2200aae4f827e7f2a9165 /lisp/mastodon-toot.el
parent5f41086d3a03e8781aab77ab17f4d4f95263e07c (diff)
Remove most byte-compile warnings.
We do this by - moving vars into the files where they are (mostly) used - "declaring" vars used elsewhere with the (defvar <var-name>) pattern, - declaring functions defined in others functions rather than loading the file via require.
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el32
1 files changed, 17 insertions, 15 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index fc31a5b..ffe6454 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -29,16 +29,26 @@
;;; Code:
-(require 'mastodon-auth nil t)
-
-(defgroup mastodon-toot nil
- "Capture Mastodon toots."
- :prefix "mastodon-toot-"
- :group 'mastodon)
-
(defvar mastodon-toot--reply-to-id nil)
(defvar mastodon-toot--content-warning nil)
+(declare-function mastodon-http--api "mastodon-http")
+(declare-function mastodon-http--post "mastodon-http")
+(declare-function mastodon-http--triage "mastodon-http")
+(declare-function mastodon-tl--field "mastodon-tl")
+(declare-function mastodon-tl--goto-next-toot "mastodon-tl")
+(declare-function mastodon-tl--property "mastodon-tl")
+(declare-function mastodon-toot "mastodon")
+
+(defvar mastodon-toot-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "C-c C-c") #'mastodon-toot--send)
+ (define-key map (kbd "C-c C-k") #'mastodon-toot--cancel)
+ (define-key map (kbd "C-c C-w") #'mastodon-toot--toggle-warning)
+ map)
+ "Keymap for `mastodon-toot'.")
+
+
(defun mastodon-toot--action-success (marker &optional rm)
"Insert MARKER with 'success face in byline.
@@ -211,14 +221,6 @@ If REPLY-TO-ID is provided, set the MASTODON-TOOT--REPLY-TO-ID var."
(mastodon-toot--setup-as-reply reply-to-user reply-to-id))
(mastodon-toot-mode t)))
-(defvar mastodon-toot-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map (kbd "C-c C-c") #'mastodon-toot--send)
- (define-key map (kbd "C-c C-k") #'mastodon-toot--cancel)
- (define-key map (kbd "C-c C-w") #'mastodon-toot--toggle-warning)
- map)
- "Keymap for `mastodon-toot'.")
-
(define-minor-mode mastodon-toot-mode
"Minor mode to capture Mastodon toots."
:group 'mastodon-toot