Function: majutsu-gerrit--account-annotate-candidate

majutsu-gerrit--account-annotate-candidate is a natively compiled function defined in majutsu-gerrit.el.

Signature

(majutsu-gerrit--account-annotate-candidate CANDIDATE)

Documentation

Return aligned annotation for CANDIDATE using its account text property.

When majutsu-gerrit-account-show-avatars is non-nil and the display supports images, return a (CANDIDATE PREFIX SUFFIX) list so Consult can render an avatar prefix.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-gerrit.el
(defun majutsu-gerrit--account-annotate-candidate (candidate)
  "Return aligned annotation for CANDIDATE using its account text property.
When `majutsu-gerrit-account-show-avatars' is non-nil and the display
supports images, return a (CANDIDATE PREFIX SUFFIX) list so Consult
can render an avatar prefix."
  (when-let* ((account (get-text-property 0 'majutsu-gerrit-account candidate))
              (annotation (majutsu-gerrit--account-annotation account candidate)))
    (let ((aligned (consult--annotate-align candidate annotation)))
      (if-let* ((prefix (majutsu-gerrit--account-avatar-prefix account)))
          (list candidate prefix aligned)
        aligned))))