Function: marginalia-annotate-frame

marginalia-annotate-frame is a natively compiled function defined in marginalia.el.

Signature

(marginalia-annotate-frame CAND)

Documentation

Annotate frame named CAND with window and buffer information.

Source Code

;; Defined in /nix/store/hym71by08nv7fpgl7asan3dvidx05yya-emacs-packages-deps/share/emacs/site-lisp/elpa/marginalia-20260926.1228/marginalia.el
(defun marginalia-annotate-frame (cand)
  "Annotate frame named CAND with window and buffer information."
  (when-let* ((frame (cl-loop
                      for f in (frame-list)
                      if (or (equal cand (frame-parameter f 'name))
                             ;; `frame-id' is an Emacs 31 addition
                             (when (fboundp 'frame-id)
                               (equal cand (number-to-string (frame-id f)))))
                      return f)))
    (let ((wins (window-list frame)))
      (marginalia--fields
       ((length wins) :format "win:%s" :face 'marginalia-size)
       ((if (eq frame (selected-frame))
            "(current frame)"
          (mapconcat (lambda (w) (buffer-name (window-buffer w))) wins " "))
        :face 'marginalia-documentation)))))