aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexjgriffith <griffitaj @gmail.com>2017-05-17 10:34:34 -0400
committerJohnson Denen <johnson.denen@gmail.com>2017-05-18 10:21:21 -0400
commit349a46befedafae39ab05598c1005f9f2c82fadf (patch)
tree7344c3118ee7ca80080f90d9c2dc7447860ea1a2
parentc0708e9338de45415c0b70019cf45ee9a5bad230 (diff)
replaced declare-function with autoload
-rw-r--r--lisp/mastodon-auth.el4
-rw-r--r--lisp/mastodon-client.el4
-rw-r--r--lisp/mastodon-http.el2
-rw-r--r--lisp/mastodon-inspect.el12
-rw-r--r--lisp/mastodon-tl.el12
-rw-r--r--lisp/mastodon-toot.el30
-rw-r--r--lisp/mastodon.el24
7 files changed, 44 insertions, 44 deletions
diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el
index 68c4d21..513fbc2 100644
--- a/lisp/mastodon-auth.el
+++ b/lisp/mastodon-auth.el
@@ -31,8 +31,8 @@
(require 'plstore)
-(declare-function mastodon-client "mastodon-client")
-(declare-function mastodon-http--post "mastodon-http")
+(autoload 'mastodon-client "mastodon-client")
+(autoload 'mastodon-http--post "mastodon-http")
(defvar mastodon-instance-url)
(defgroup mastodon-auth nil
diff --git a/lisp/mastodon-client.el b/lisp/mastodon-client.el
index 3a9a606..b4fcbdb 100644
--- a/lisp/mastodon-client.el
+++ b/lisp/mastodon-client.el
@@ -30,8 +30,8 @@
;;; Code:
(require 'plstore)
-(declare-function mastodon-http--api "mastodon-http")
-(declare-function mastodon-http--post "mastodon-http")
+(autoload 'mastodon-http--api "mastodon-http")
+(autoload 'mastodon-http--post "mastodon-http")
(defcustom mastodon-client--token-file (concat user-emacs-directory "mastodon.plstore")
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 9f178c4..0f71f68 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -32,7 +32,7 @@
(require 'json)
(defvar mastodon-instance-url)
(defvar mastodon-auth--token)
-(declare-function mastodon-auth--access-token "mastodon-auth")
+(autoload 'mastodon-auth--access-token "mastodon-auth")
(defvar mastodon-http--api-version "v1")
diff --git a/lisp/mastodon-inspect.el b/lisp/mastodon-inspect.el
index 0457e74..9aee7dc 100644
--- a/lisp/mastodon-inspect.el
+++ b/lisp/mastodon-inspect.el
@@ -28,12 +28,12 @@
;; Some tools to help inspect / debug mastodon.el
;;; Code:
-(declare-function mastodon-http--api "mastodon-http")
-(declare-function mastodon-http--get-json "mastodon-http")
-(declare-function mastodon-media--inline-images "mastodon-media")
-(declare-function mastodon-mode "mastodon")
-(declare-function mastodon-tl--property "mastodon-tl")
-(declare-function mastodon-tl--toot "mastodon-tl")
+(autoload 'mastodon-http--api "mastodon-http")
+(autoload 'mastodon-http--get-json "mastodon-http")
+(autoload 'mastodon-media--inline-images "mastodon-media")
+(autoload 'mastodon-mode "mastodon")
+(autoload 'mastodon-tl--property "mastodon-tl")
+(autoload 'mastodon-tl--toot "mastodon-tl")
(defgroup mastodon-inspect nil
"Tools to help inspect toots."
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 72883fc..b84bc94 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -33,12 +33,12 @@
(require 'thingatpt) ;; for word-at-point
(require 'time-date)
-(declare-function mastodon-http--api "mastodon-http")
-(declare-function mastodon-http--get-json "mastodon-http")
-(declare-function mastodon-media--get-avatar-rendering "mastodon-media")
-(declare-function mastodon-media--get-media-link-rendering "mastodon-media")
-(declare-function mastodon-media--inline-images "mastodon-media")
-(declare-function mastodon-mode "mastodon")
+(autoload 'mastodon-http--api "mastodon-http")
+(autoload 'mastodon-http--get-json "mastodon-http")
+(autoload 'mastodon-media--get-avatar-rendering "mastodon-media")
+(autoload 'mastodon-media--get-media-link-rendering "mastodon-media")
+(autoload 'mastodon-media--inline-images "mastodon-media")
+(autoload 'mastodon-mode "mastodon")
(defvar mastodon-toot-timestamp-format)
(defgroup mastodon-tl nil
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 296f95f..eaf5339 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -32,13 +32,13 @@
(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")
+(autoload 'mastodon-http--api "mastodon-http")
+(autoload 'mastodon-http--post "mastodon-http")
+(autoload 'mastodon-http--triage "mastodon-http")
+(autoload 'mastodon-tl--field "mastodon-tl")
+(autoload 'mastodon-tl--goto-next-toot "mastodon-tl")
+(autoload 'mastodon-tl--property "mastodon-tl")
+(autoload 'mastodon-toot "mastodon")
(defvar mastodon-toot-mode-map
(let ((map (make-sparse-keymap)))
@@ -166,28 +166,28 @@ Set `mastodon-toot--content-warning' to nil."
(mapcar (lambda (b)
(setf (car b) (vector prefix (car b)))
b)
- bindings)))
+ bindings)))
(defun mastodon-toot--format-kbind-command (cmd)
"Format CMD to be more readable.
e.g. mastodon-toot--send -> Send."
(let* ((str (symbol-name cmd))
- (re "--\\(.*\\)$")
- (str2 (save-match-data
- (string-match re str)
- (match-string 1 str))))
+ (re "--\\(.*\\)$")
+ (str2 (save-match-data
+ (string-match re str)
+ (match-string 1 str))))
(capitalize (replace-regexp-in-string "-" " " str2))))
(defun mastodon-toot--format-kbind (kbind)
"Format a single keybinding, KBIND, for display in documentation."
(let ((key (help-key-description (car kbind) nil))
- (command (mastodon-toot--format-kbind-command (cdr kbind))))
+ (command (mastodon-toot--format-kbind-command (cdr kbind))))
(format "\t%s - %s" key command)))
(defun mastodon-toot--format-kbinds (kbinds)
"Format a list keybindings, KBINDS, for display in documentation."
(mapconcat 'identity (cons "" (mapcar #'mastodon-toot--format-kbind kbinds))
- "\n"))
+ "\n"))
(defun mastodon-toot--make-mode-docs ()
"Create formatted documentation text for the mastodon-toot-mode."
@@ -217,7 +217,7 @@ If REPLY-TO-ID is provided, set the MASTODON-TOOT--REPLY-TO-ID var."
If REPLY-TO-USER is provided, inject their handle into the message.
If REPLY-TO-ID is provided, set the MASTODON-TOOT--REPLY-TO-ID var."
(let* ((buffer-exists (get-buffer "*new toot*"))
- (buffer (or buffer-exists (get-buffer-create "*new toot*"))))
+ (buffer (or buffer-exists (get-buffer-create "*new toot*"))))
(switch-to-buffer-other-window buffer)
(when (not buffer-exists)
(mastodon-toot--display-docs)
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 9f7257e..6e3a5dc 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -32,18 +32,18 @@
;;; Code:
(declare-function discover-add-context-menu "discover")
(declare-function emojify-mode "emojify")
-(declare-function mastodon-tl--get-federated-timeline "mastodon-tl")
-(declare-function mastodon-tl--get-home-timeline "mastodon-tl")
-(declare-function mastodon-tl--get-local-timeline "mastodon-tl")
-(declare-function mastodon-tl--get-tag-timeline "mastodon-tl")
-(declare-function mastodon-tl--goto-next-toot "mastodon-tl")
-(declare-function mastodon-tl--goto-prev-toot "mastodon-tl")
-(declare-function mastodon-tl--thread "mastodon-tl")
-(declare-function mastodon-tl--update "mastodon-tl")
-(declare-function mastodon-toot--compose-buffer "mastodon-toot")
-(declare-function mastodon-toot--reply "mastodon-toot")
-(declare-function mastodon-toot--toggle-boost "mastodon-toot")
-(declare-function mastodon-toot--toggle-favourite "mastodon-toot")
+(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."