Function: majutsu-ref--completion-remote-field

majutsu-ref--completion-remote-field is a natively compiled function defined in majutsu-ref.el.

Signature

(majutsu-ref--completion-remote-field LABEL REMOTES FACE)

Documentation

Format LABEL for REMOTES using FACE.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-ref.el
(defun majutsu-ref--completion-remote-field (label remotes face)
  "Format LABEL for REMOTES using FACE."
  (when remotes
    (let* ((remotes (delete-dups (copy-sequence remotes)))
           (count (length remotes)))
      (majutsu-completion-field
       (if (= count 1)
           (format "%s@%s" label (car remotes))
         (format "%s@%s%s"
                 label
                 (string-join (seq-take remotes 2) ",")
                 (if (> count 2)
                     (format ",… (%d)" count)
                   "")))
       face))))