branch: elpa/fedi
commit 70b08c38d4601811fe2e2136531b072320a20c5a
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    add type arg to make-mode-docs for buffer headline.
---
 fedi-post.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/fedi-post.el b/fedi-post.el
index ee139fdf4b2..35df2fdc54c 100644
--- a/fedi-post.el
+++ b/fedi-post.el
@@ -381,7 +381,7 @@ LONGEST is the length of the longest binding."
   (propertize str
               'face 'fedi-post-docs-face))
 
-(defun fedi-post--make-mode-docs (&optional mode prefix)
+(defun fedi-post--make-mode-docs (&optional mode prefix type)
   "Create formatted documentation text for MODE or fedi-post-mode.
 PREFIX is a string corresponding to the prefix of the minor mode
 enabled. It is used for constructing clean keybinding
@@ -394,7 +394,8 @@ descriptions."
                          (fedi-post--format-kbinds kbinds prefix))))
     (concat
      (fedi-post-comment
-      " Compose a new post here. The following keybindings are available:")
+      (format
+       " Compose a new %s here. The following keybindings are available:" 
type))
      (mapconcat #'identity
                 (fedi-post--formatted-kbinds-pairs
                  (fedi-post--format-kbinds kbinds prefix)
@@ -410,7 +411,8 @@ descriptions."
                                (concat "post-" (downcase field)))
                               t)))
 
-(defun fedi-post--display-docs-and-status-fields (&optional mode prefix fields)
+(defun fedi-post--display-docs-and-status-fields (&optional mode prefix
+                                                            fields type)
   "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.
@@ -422,7 +424,7 @@ FIELDS is a list of alists of fields to add, using 
`fedi-post--concat-fields'."
          
"|=================================================================|"))
     (insert
      (concat
-      (fedi-post--make-mode-docs mode prefix) "\n"
+      (fedi-post--make-mode-docs mode prefix type) "\n"
       (fedi-post-comment divider) "\n"
       (propertize
        (concat
@@ -603,7 +605,7 @@ string, the other elements should be symbols."
         ;; (setq markdown-mode-hook (delete 'variable-pitch-mode 
markdown-mode-hook))
         (variable-pitch-mode -1)))
     (unless buffer-exists
-      (fedi-post--display-docs-and-status-fields minor prefix fields))
+      (fedi-post--display-docs-and-status-fields minor prefix fields type))
     ;; set up completion:
     (when fedi-post--enable-completion
       (set (make-local-variable 'completion-at-point-functions)

Reply via email to