Function: treemacs--button-symbol-switch

treemacs--button-symbol-switch is a byte-compiled function defined in treemacs-core-utils.el.

Signature

(treemacs--button-symbol-switch NEW-SYMBOL)

Documentation

Replace icon in current line with NEW-SYMBOL.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(define-inline treemacs--button-symbol-switch (new-symbol)
  "Replace icon in current line with NEW-SYMBOL."
  (inline-letevals (new-symbol)
    (inline-quote
     (save-excursion
       (let ((len (length ,new-symbol)))
         (goto-char (- (treemacs-button-start (next-button (line-beginning-position) t)) len))
         (insert ,new-symbol)
         (delete-char len))))))