Function: majutsu-gerrit--account-annotation

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

Signature

(majutsu-gerrit--account-annotation ACCOUNT CANDIDATE)

Documentation

Return completion annotation body for ACCOUNT candidate CANDIDATE.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-gerrit.el
(defun majutsu-gerrit--account-annotation (account candidate)
  "Return completion annotation body for ACCOUNT candidate CANDIDATE."
  (let ((body (string-join
               (delq nil
                     (list (majutsu-gerrit--account-get account 'name)
                           (majutsu-gerrit--account-get account 'display_name)
                           (when-let* ((username (majutsu-gerrit--account-get account 'username))
                                       ((not (equal username candidate))))
                             (format "@%s" username))
                           (when-let* ((email (majutsu-gerrit--account-get account 'email))
                                       ((not (equal email candidate))))
                             (format "<%s>" email))
                           (when-let* ((id (majutsu-gerrit--account-get account '_account_id)))
                             (format "#%s" id))))
               " ")))
    (unless (string-empty-p body)
      (propertize (concat " " body) 'face 'majutsu-completion-documentation))))