diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-06-24 15:15:41 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-06-24 15:15:41 +0200 |
commit | c14891151345abc20efb5669bbe209604c57450e (patch) | |
tree | 1205a3164b873be16fcc4cf1e253075facd3ff96 /lisp/mastodon-search.el | |
parent | 40971e1f1f5ccc523f40a37c9779e2680e2a9945 (diff) | |
parent | 66b14285e428207a60bfa18cc1464c1087713258 (diff) |
Merge branch 'develop'
Diffstat (limited to 'lisp/mastodon-search.el')
-rw-r--r-- | lisp/mastodon-search.el | 20 |
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")) |