Function: forge-insert-post-heading
forge-insert-post-heading is a byte-compiled function defined in
forge-topic.el.
Signature
(forge-insert-post-heading POST TOPIC)
Source Code
;; Defined in ~/.emacs.d/elpa/forge-20260408.1922/forge-topic.el
(defun forge-insert-post-heading (post topic)
(oset magit-insert-section--current
heading-highlight-face
'magit-diff-hunk-heading-highlight)
(let* ((author (oref post author))
(created (oref post created))
(heading
(format-spec
forge-post-heading-format
`((?a . ,(propertize (concat (forge--format-avatar author)
(or author "(ghost)"))
'font-lock-face 'forge-post-author))
(?c . ,(propertize created 'font-lock-face 'forge-post-date))
(?C . ,(propertize (apply #'format "%s %s ago"
(magit--age
(float-time
(date-to-time created))))
'font-lock-face 'forge-post-date))))))
(when (forge-discussion-reply-p post)
(setq heading (concat " " heading)))
(font-lock-append-text-property
0 (length heading)
'font-lock-face (cond-let*
([_(forge-discussion-p topic)]
[answer (oref topic answer)]
[_(equal (oref post their-id)
(forge--their-id answer))]
'forge-discussion-answer-heading)
((forge-discussion-reply-p post)
'(magit-dimmed magit-diff-hunk-heading))
('magit-diff-hunk-heading))
heading)
(magit-insert-heading heading)))