aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-search.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el
index d73bf9f..e69366e 100644
--- a/lisp/mastodon-search.el
+++ b/lisp/mastodon-search.el
@@ -122,15 +122,21 @@ PRINT-FUN is the function used to print the data from the response."
;; functions for mastodon search
-(defun mastodon-search--insert-heading (heading &optional type)
- "Format HEADING as a heading.
+(defun mastodon-search--insert-heading (str &optional type)
+ "Insert STR as a heading.
Optionally add string TYPE after HEADING."
(insert
- (mastodon-tl--set-face (concat "\n " mastodon-tl--horiz-bar "\n "
- (upcase heading) " "
- (if type (upcase type) "") "\n"
- " " mastodon-tl--horiz-bar "\n")
- 'success)))
+ (mastodon-search--format-heading str type)))
+
+(defun mastodon-search--format-heading (str &optional type)
+ "Format STR as a heading.
+Optionally add string TYPE after HEADING."
+ (mastodon-tl--set-face
+ (concat "\n " mastodon-tl--horiz-bar "\n "
+ (upcase str) " "
+ (if type (upcase type) "") "\n"
+ " " mastodon-tl--horiz-bar "\n")
+ 'success))
(defvar mastodon-search-types
'("statuses" "accounts" "hashtags"))