aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-08-26 18:01:48 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-08-26 18:01:48 +0200
commite620ef7cd4ff10a78334cd5e4293756e33f58f71 (patch)
treecce7dfe6638460e3734eeab6e93f1929998efd62
parentad6e15019541a38323733ee1576b8c8b39cc5f36 (diff)
completion customizes edit for handling tags completion
-rw-r--r--lisp/mastodon-search.el2
-rw-r--r--lisp/mastodon-toot.el12
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el
index 5756ae4..89df311 100644
--- a/lisp/mastodon-search.el
+++ b/lisp/mastodon-search.el
@@ -59,7 +59,7 @@
Returns a nested list containing user handle, display name, and URL."
(interactive "sSearch mastodon for: ")
(let* ((url (mastodon-http--api "accounts/search"))
- (response (if (equal mastodon-toot--enable-completion-for-mentions "following")
+ (response (if (equal mastodon-toot--completion-style-for-mentions "following")
(mastodon-http--get-search-json url query "following=true")
(mastodon-http--get-search-json url query))))
(mapcar #'mastodon-search--get-user-info-@ response)))
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index b3de461..b33350d 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -103,14 +103,20 @@ followers-only), or \"direct\"."
:group 'mastodon-toot
:type 'integer)
-(defcustom mastodon-toot--enable-completion-for-mentions
- (if (require 'company nil :noerror) "following" "off")
- "Whether to enable company completion for mentions.
+(defcustom mastodon-toot--enable-completion
+ (if (require 'company nil :noerror) t nil)
+ "Whether to enable completion of mentions and hashtags.
Used for completion in toot compose buffer.
This is only used if company mode is installed."
:group 'mastodon-toot
+ :type 'boolean)
+
+(defcustom mastodon-toot--completion-style-for-mentions
+ (if (require 'company nil :noerror) "following" "off")
+ "The company completion style to use for mentions."
+ :group 'mastodon-toot
:type '(choice
(const :tag "off" nil)
(const :tag "following only" "following")