From 71b2929bdc63a09889d462495acf49c459b67490 Mon Sep 17 00:00:00 2001 From: mousebot Date: Mon, 17 May 2021 20:05:14 +0200 Subject: message for notifs load, tiny search.el cleanup --- lisp/mastodon-search.el | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'lisp/mastodon-search.el') diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index 7b1dfb1..6737e11 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -1,7 +1,7 @@ -;;; mastodon-search.el --- serach functions for mastodon.el -*- lexical-binding: t -*- +;;; mastodon-search.el --- search functions for mastodon.el -*- lexical-binding: t -*- ;; Copyright (C) 2017-2019 Johnson Denen -;; Author: Johnson Denen +;; Author: Johnson Denen , martyhiatt ;; Version: 0.9.0 ;; Homepage: https://github.com/jdenen/mastodon.el ;; Package-Requires: ((emacs "24.4")) @@ -28,15 +28,18 @@ ;; A basic search function for mastodon.el ;;; Code: +(require 'json) -;; autoloads -;; mastodon-tl--as-string -;; mastodon-tl--set-face -;; mastodon-tl--render-text -;; mastodon-tl--toot (autoload 'mastodon-http--get-json "mastodon-http") +(autoload 'mastodon-tl--as-string "mastodon-tl") +(autoload 'mastodon-mode "mastodon") +(autoload 'mastodon-tl--set-face "mastodon-tl") +(autoload 'mastodon-tl--render-text "mastodon-tl") +(autoload 'mastodon-tl--as-string "mastodon-tl") +(autoload 'mastodon-auth--access-token "mastodon-auth") -;; mastodon-instance-url +(defvar mastodon-instance-url) +(defconst mastodon-http--timeout) (defun mastodon-search--search-query (query) "Prompt for a search QUERY and return accounts, statuses, and hashtags." @@ -51,8 +54,8 @@ accts)) ; returns a list of three-item lists (tags-list (mapcar #'mastodon-search--get-hashtag-info tags)) - (status-list (mapcar #'mastodon-search--get-status-info - statuses)) + ;; (status-list (mapcar #'mastodon-search--get-status-info + ;; statuses)) (status-ids-list (mapcar 'mastodon-search--get-id-from-status statuses)) (toots-list-json (mapcar #'mastodon-search--fetch-full-status-from-id @@ -135,7 +138,6 @@ This allows us to access the full account etc. details and to render them proper json)) ;; http functions for search: - (defun mastodon-http--process-json-search () "Process JSON returned by a search query to the server." (goto-char (point-min)) -- cgit v1.2.3