branch: elpa/fedi
commit ba87a5ad73853721ada234a52fc5ad6d2cec41c0
Author: marty hiatt <martianhiatus [a t] riseup [d o t] net>
Commit: marty hiatt <martianhiatus [a t] riseup [d o t] net>

    generalize fedi-post--display-docs-and-status-fields
---
 fedi-post.el | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/fedi-post.el b/fedi-post.el
index aa94f753725..2e5974392e9 100644
--- a/fedi-post.el
+++ b/fedi-post.el
@@ -368,7 +368,8 @@ descriptions."
                  longest-kbind)
                 nil))))
 
-(defun fedi-post--display-docs-and-status-fields (&optional mode prefix)
+(defun fedi-post--display-docs-and-status-fields (&optional mode prefix
+                                                            fields)
   "Insert propertized text with documentation about MODE or `fedi-post-mode'.
 Also includes and the status fields which will get updated based
 on the status of NSFW, language, media attachments, etc.
@@ -387,10 +388,16 @@ descriptions."
        ;; 'post-post-counter t)
        ;; " ⋅ "
        (propertize "Language"
-                   'post-post-language t)
+                   'post-language t)
        " "
        (propertize "NSFW"
-                   'post-post-nsfw-flag t)
+                   'post-nsfw t)
+       " "
+       (cl-loop for field in fields
+                concat (propertize (capitalize field)
+                                   (intern
+                                    (concat "post-" field))
+                                   t))
        "\n"
        divider
        "\n")

Reply via email to