Function: helpful--format-position-heads

helpful--format-position-heads is a byte-compiled function defined in helpful.el.

Signature

(helpful--format-position-heads POSITION-HEADS PATH)

Documentation

Given a list of outer sexps, format them for display.

POSITION-HEADS takes the form ((123 (defun foo)) (456 (defun bar))).

Source Code

;; Defined in ~/.emacs.d/elpa/helpful-20250408.334/helpful.el
(defun helpful--format-position-heads (position-heads path)
  "Given a list of outer sexps, format them for display.
POSITION-HEADS takes the form ((123 (defun foo)) (456 (defun bar)))."
  (let ((longest-head
         (->> position-heads
              (-map (-lambda ((_pos head)) (helpful--format-head head)))
              (-map #'length)
              (-max))))
    (->> (helpful--count-values position-heads)
         (-map (-lambda (((pos head) . count))
                 (helpful--format-reference head longest-head count pos path)))
         (s-join "\n"))))