Function: treemacs-remove-annotation-face

treemacs-remove-annotation-face is a byte-compiled function defined in treemacs-annotations.el.

Signature

(treemacs-remove-annotation-face PATH SOURCE)

Documentation

Remove PATH's face annotation for the given SOURCE.

PATH: Node Path SOURCE: String

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-annotations.el
(define-inline treemacs-remove-annotation-face (path source)
  "Remove PATH's face annotation for the given SOURCE.

PATH: Node Path
SOURCE: String"
  (inline-letevals (path source)
    (inline-quote
     (-when-let (ann (treemacs-get-annotation ,path))
       (let* ((git-face (treemacs-annotation->git-face ann))
              (old-faces (treemacs-annotation->face ann))
              (new-faces (--reject-first
                          (string= ,source (car it))
                          old-faces)))
         (if new-faces
             (setf
              (treemacs-annotation->face ann)
              new-faces
              (treemacs-annotation->face-value ann)
              (append (mapcar #'cdr new-faces) git-face))
           (setf
            (treemacs-annotation->face ann) nil
            (treemacs-annotation->face-value ann) git-face)))))))