Function: treemacs-apply-annotations-in-buffer

treemacs-apply-annotations-in-buffer is a byte-compiled function defined in treemacs-annotations.el.

Signature

(treemacs-apply-annotations-in-buffer BUFFER)

Documentation

Apply annotations for all nodes in the given BUFFER.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-annotations.el
(defun treemacs-apply-annotations-in-buffer (buffer)
  "Apply annotations for all nodes in the given BUFFER."
  (when (buffer-live-p buffer)
    (with-current-buffer buffer
      (treemacs-with-writable-buffer
       (save-excursion
         (goto-char (point-min))
         (let* ((btn (point)))
           (while (setf btn (next-button btn))
             (let ((path (treemacs-button-get btn :path))
                   (use-git (not (treemacs-button-get btn :no-git))))
               (treemacs--do-apply-annotation
                btn
                (-when-let (git-cache
                            (and use-git
                                 (->> path
                                      (treemacs--parent-dir)
                                      (ht-get treemacs--git-cache))))
                  (ht-get git-cache path)))))))))))