Function: treemacs-remove-annotation-suffix

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

Signature

(treemacs-remove-annotation-suffix PATH SOURCE)

Documentation

Remove PATH's suffix 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-suffix (path source)
  "Remove PATH's suffix annotation for the given SOURCE.

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