Function: helpful--format-reference

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

Signature

(helpful--format-reference HEAD LONGEST-HEAD REF-COUNT POSITION PATH)

Documentation

Return a syntax-highlighted version of HEAD, with a link to its source location.

Source Code

;; Defined in ~/.emacs.d/elpa/helpful-20250408.334/helpful.el
(defun helpful--format-reference (head longest-head ref-count position path)
  "Return a syntax-highlighted version of HEAD, with a link
to its source location."
  (let ((formatted-count
         (format "%d reference%s"
                 ref-count (if (> ref-count 1) "s" ""))))
    (propertize
     (format
      "%s %s"
      (s-pad-right longest-head " " (helpful--format-head head))
      (propertize formatted-count 'face 'font-lock-comment-face))
     'helpful-path path
     'helpful-pos position)))