aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-12-17 16:22:46 +0100
committermousebot <mousebot@riseup.net>2021-12-17 16:22:46 +0100
commit3a87f6caa62cbd0e925c765d2ac2840ba55f8db1 (patch)
treefd4fd7d3da244ad32933e250f9b0cef5c4fcd3c9 /lisp
parentfc8005c8fe3c5466c7e2d2b510e24f6eba661431 (diff)
depend on emacs 27.1, flychecks, docstrings, etc.
strictly, the 27.1 dependency is only for proper-list-p in -http.el.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-async.el25
-rw-r--r--lisp/mastodon-auth.el2
-rw-r--r--lisp/mastodon-client.el2
-rw-r--r--lisp/mastodon-discover.el2
-rw-r--r--lisp/mastodon-http.el2
-rw-r--r--lisp/mastodon-inspect.el4
-rw-r--r--lisp/mastodon-media.el2
-rw-r--r--lisp/mastodon-notifications.el2
-rw-r--r--lisp/mastodon-profile.el2
-rw-r--r--lisp/mastodon-search.el2
-rw-r--r--lisp/mastodon-tl.el2
-rw-r--r--lisp/mastodon-toot.el10
-rw-r--r--lisp/mastodon.el5
13 files changed, 37 insertions, 25 deletions
diff --git a/lisp/mastodon-async.el b/lisp/mastodon-async.el
index 3651bd5..77fdb8e 100644
--- a/lisp/mastodon-async.el
+++ b/lisp/mastodon-async.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
@@ -32,6 +32,8 @@
(require 'json)
(require 'url-http)
+(defvar url-http-end-of-headers)
+
(autoload 'mastodon-auth--access-token "mastodon-auth")
(autoload 'mastodon-http--api "mastodon-http")
(autoload 'mastodon-http--get-json "mastodon-http")
@@ -153,10 +155,10 @@ NAME is the center portion of the buffer name for
(url-retrieve url callback)))
(defun mastodon-async--set-http-buffer (buffer http-buffer)
- "Initializes for BUFFER a local variable `mastodon-async--http-buffer'.
+ "Initialize for BUFFER a local variable `mastodon-async--http-buffer'.
HTTP-BUFFER is the initializing value. Use this funcion if HTTP-BUFFER
-is not known when `mastodon-async--setup-buffer' is called."
+is not known when `mastodon-async--setup-buffer' is called."
(with-current-buffer (get-buffer-create buffer)
(setq mastodon-async--http-buffer http-buffer)))
@@ -164,6 +166,7 @@ is not known when `mastodon-async--setup-buffer' is called."
http-buffer
buffer-name
queue-name)
+ "Set local variables for BUFFER, HTTP-BUFFER, BUFFER-NAME, and QUEUE-NAME."
(with-current-buffer (get-buffer-create buffer)
(let ((value mastodon-instance-url))
(make-local-variable 'mastodon-instance-url)
@@ -173,7 +176,7 @@ is not known when `mastodon-async--setup-buffer' is called."
(setq mastodon-async--queue queue-name)))
(defun mastodon-async--setup-http (http-buffer name)
- "Adds local variables to HTTP-BUFFER.
+ "Add local variables to HTTP-BUFFER.
NAME is used to generate the display buffer and the queue."
(let ((queue-name (concat " *mastodon-async-queue-" name "-"
@@ -184,7 +187,8 @@ NAME is used to generate the display buffer and the queue."
buffer-name queue-name)))
(defun mastodon-async--setup-queue (http-buffer name)
- "Sets up the buffer for the async queue."
+ "Set up HTTP-BUFFER buffer for the async queue.
+NAME is used to generate the display buffer and the queue."
(let ((queue-name (concat " *mastodon-async-queue-" name "-"
mastodon-instance-url "*"))
(buffer-name(concat "*mastodon-async-display-" name "-"
@@ -194,11 +198,11 @@ NAME is used to generate the display buffer and the queue."
queue-name))
(defun mastodon-async--setup-buffer (http-buffer name endpoint)
- "Sets up the buffer timeline like `mastodon-tl--init'.
+ "Set up the buffer timeline like `mastodon-tl--init'.
HTTP-BUFFER the name of the http-buffer, if unknown, set to...
NAME is the name of the stream for the buffer name.
-ENPOINT is the endpoint for the stream and timeline."
+ENDPOINT is the endpoint for the stream and timeline."
(let ((queue-name (concat " *mastodon-async-queue-" name "-"
mastodon-instance-url "*"))
(buffer-name (concat "*mastodon-async-display-" name "-"
@@ -211,7 +215,7 @@ ENPOINT is the endpoint for the stream and timeline."
(t (format "timelines/%s" endpoint)))))
(mastodon-async--set-local-variables buffer-name http-buffer
buffer-name queue-name)
- ;; Similar to timeline init.
+ ;; Similar to timeline init.
(with-current-buffer (get-buffer-create buffer-name)
(setq inhibit-read-only t) ; for home timeline?
(make-local-variable 'mastodon-tl--enable-relative-timestamps)
@@ -238,7 +242,8 @@ ENPOINT is the endpoint for the stream and timeline."
(defun mastodon-async--start-process (endpoint filter &optional name)
"Start an async mastodon stream at ENDPOINT.
-Filter the toots using FILTER."
+Filter the toots using FILTER.
+NAME is used for the queue and display buffer."
(let* ((stream (concat "streaming/" endpoint))
(async-queue (mastodon-async--setup-queue "" (or name stream)))
(async-buffer (mastodon-async--setup-buffer "" (or name stream) endpoint))
@@ -249,7 +254,7 @@ Filter the toots using FILTER."
(message "HTTP SOURCE CLOSED")))))
(mastodon-async--setup-http http-buffer (or name stream))
(mastodon-async--set-http-buffer async-buffer http-buffer)
- (mastodon-async--set-http-buffer async-queue http-buffer)
+ (mastodon-async--set-http-buffer async-queue http-buffer)
(set-process-filter (get-buffer-process http-buffer)
(mastodon-async--http-hook filter))
http-buffer))
diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el
index 8355200..31df2ae 100644
--- a/lisp/mastodon-auth.el
+++ b/lisp/mastodon-auth.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
diff --git a/lisp/mastodon-client.el b/lisp/mastodon-client.el
index cb8eb26..a03d035 100644
--- a/lisp/mastodon-client.el
+++ b/lisp/mastodon-client.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
diff --git a/lisp/mastodon-discover.el b/lisp/mastodon-discover.el
index 6b2eadf..21a0f95 100644
--- a/lisp/mastodon-discover.el
+++ b/lisp/mastodon-discover.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 00a0718..4461ea2 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "27.1") (request "0.2.0"))
+;; Package-Requires: ((emacs "27.1") (request "0.3.0"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
diff --git a/lisp/mastodon-inspect.el b/lisp/mastodon-inspect.el
index 4d91948..c9a9277 100644
--- a/lisp/mastodon-inspect.el
+++ b/lisp/mastodon-inspect.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
@@ -98,6 +98,7 @@
(defvar mastodon-inspect--search-result-tags)
(defun mastodon-inspect--get-search-result (query)
+ "Inspect function for a search result for QUERY."
(interactive)
(setq mastodon-inspect--search-query-full-result
(append ; convert vector to list
@@ -111,6 +112,7 @@
nil)))
(defun mastodon-inspect--get-search-account (query)
+ "Return JSON for a single account after search QUERY."
(interactive)
(setq mastodon-inspect--search-query-accounts-result
(append ; convert vector to list
diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el
index bbab816..6e02ebb 100644
--- a/lisp/mastodon-media.el
+++ b/lisp/mastodon-media.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 5efb7d4..ebf98ba 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index d21f5c0..dbe5686 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1") (seq "1.0"))
+;; Package-Requires: ((emacs "27.1") (seq "1.0"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el
index a7dcda9..6317895 100644
--- a/lisp/mastodon-search.el
+++ b/lisp/mastodon-search.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>, martyhiatt <mousebot@riseup.net>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 89604b5..71e08de 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index c89acc7..6cf337a 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1"))
+;; Package-Requires: ((emacs "27.1"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
@@ -545,7 +545,11 @@ The prefix can match against both user handles and display names."
(propertize handle 'annot display-name 'meta url)))
(defun mastodon-toot-mentions (command &optional arg &rest ignored)
- "A company completion backend for toot mentions."
+ "A company completion backend for toot mentions.
+COMMAND is either prefix, to fetch a prefix query, candidates, to
+build a list of candidates with query ARG, annotation, to format
+an annotation for candidate ARG, or meta, to format meta info for
+candidate ARG. IGNORED remains a mystery."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'mastodon-toot-mentions))
@@ -645,7 +649,7 @@ File is actually attached to the toot upon posting."
(mastodon-toot--upload-attached-media (car (last mastodon-toot--media-attachments)))))
(defun mastodon-toot--upload-attached-media (attachment)
- "Upload a single attachment using `mastodon-http--post-media-attachment'.
+ "Upload a single ATTACHMENT using `mastodon-http--post-media-attachment'.
The item's id is added to `mastodon-toot--media-attachment-ids',
which is used to attach it to a toot when posting."
(let* ((filename (expand-file-name
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 2411e20..adc1ac8 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2019 Johnson Denen
;; Author: Johnson Denen <johnson.denen@gmail.com>
;; Version: 0.9.2
-;; Package-Requires: ((emacs "26.1") (request "0.3.2") (seq "1.0"))
+;; Package-Requires: ((emacs "27.1") (request "0.3.2") (seq "1.0"))
;; Homepage: https://git.blast.noho.st/mouse/mastodon.el
;; This file is not part of GNU Emacs.
@@ -31,7 +31,8 @@
;;; Code:
(require 'cl-lib) ; for `cl-some' call in mastodon
-(require 'mastodon-toot) ; hack to make mastodon-toot customs visible
+;; hack to make mastodon-toot customizes visible prior to running mastodon-toot:
+(require 'mastodon-toot)
(declare-function discover-add-context-menu "discover")
(declare-function emojify-mode "emojify")