From 1f4870555241fcc55f6f2c2e2f6f64993ec2c3ad Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 26 Nov 2022 16:33:07 +0100 Subject: remove stray company funs in search.el --- lisp/mastodon-search.el | 14 +++----------- lisp/mastodon-toot.el | 3 +-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index 4aa5721..1aed676 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -50,19 +50,13 @@ ;; functions for completion of mentions in mastodon-toot -(defun mastodon-search--get-user-info-@-capf (account) +(defun mastodon-search--get-user-info-@ (account) "Get user handle, display name and account URL from ACCOUNT." (list (concat "@" (cdr (assoc 'acct account))) (cdr (assoc 'url account)) (cdr (assoc 'display_name account)))) -(defun mastodon-search--get-user-info-@ (account) - "Get user handle, display name and account URL from ACCOUNT." - (list (cdr (assoc 'display_name account)) - (concat "@" (cdr (assoc 'acct account))) - (cdr (assoc 'url account)))) - -(defun mastodon-search--search-accounts-query (query &optional capf) +(defun mastodon-search--search-accounts-query (query) "Prompt for a search QUERY and return accounts synchronously. Returns a nested list containing user handle, display name, and URL." (interactive "sSearch mastodon for: ") @@ -70,9 +64,7 @@ Returns a nested list containing user handle, display name, and URL." (response (if (equal mastodon-toot--completion-style-for-mentions "following") (mastodon-http--get-json url `(("q" . ,query) ("following" . "true")) :silent) (mastodon-http--get-json url `(("q" . ,query)) :silent)))) - (if capf - (mapcar #'mastodon-search--get-user-info-@-capf response) - (mapcar #'mastodon-search--get-user-info-@ response)))) + (mapcar #'mastodon-search--get-user-info-@ response))) ;; functions for tags completion: diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 688717d..099ce10 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -853,8 +853,7 @@ eg. \"feduser@fed.social\" -> \"feduser@fed.social\"." ;; just for the annotation-function? (setq mastodon-toot-completions (mastodon-search--search-accounts-query - (buffer-substring-no-properties start end) - :capf)))) + (buffer-substring-no-properties start end))))) :exclusive 'no :annotation-function (lambda (candidate) -- cgit v1.2.3