Function: treemacs-delete-other-windows
treemacs-delete-other-windows is an interactive and byte-compiled
function defined in treemacs-interface.el.
Signature
(treemacs-delete-other-windows)
Documentation
Same as delete-other-windows, but will not delete the treemacs window.
If this command is run when the treemacs window is selected next-window will
also not be deleted.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-interface.el
(defun treemacs-delete-other-windows ()
"Same as `delete-other-windows', but will not delete the treemacs window.
If this command is run when the treemacs window is selected `next-window' will
also not be deleted."
(interactive)
(save-selected-window
(-let [w (treemacs-get-local-window)]
(when (eq w (selected-window))
(select-window (next-window)))
(delete-other-windows)
;; we still want to call `delete-other-windows' since it contains plenty of nontrivial code
;; that we shouldn't prevent from running, so we just restore treemacs instead of preventing
;; it from being deleted
;; 'no-delete-other-windows could be used instead, but it's only available for emacs 26
(when (and w (not (equal 'visible (treemacs-current-visibility))))
(treemacs--select-not-visible-window)))))