From 751ac6134b6abe204d9c514d300343b07b26da3c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 11 Aug 2025 02:25:46 +0200 Subject: [PATCH] fix(treemacs): persp-mode compatibility The signature of `persp-activated-functions` changed upstream in persp-mode (bumped in a1121ac), but treemacs hasn't updated its usage of it yet. Ref: #8454 Amend: a1121acc94dd --- modules/ui/treemacs/config.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/ui/treemacs/config.el b/modules/ui/treemacs/config.el index 62e3e6ddb..4ee9a8e0b 100644 --- a/modules/ui/treemacs/config.el +++ b/modules/ui/treemacs/config.el @@ -29,6 +29,14 @@ This must be set before `treemacs' has loaded.") ;; Don't follow the cursor (it's more disruptive/jarring than helpful as a default) (treemacs-follow-mode -1) + ;; HACK: persp-mode changed the signature for `persp-activated-functions', but + ;; treemacs hasn't updated its usage yet. + ;; REVIEW: PR upstream + (remove-hook 'persp-activated-functions #'treemacs--remove-treemacs-window-in-new-frames) + (add-hook! 'persp-activated-functions + (defun +treemacs--remove-treemacs-window-in-new-frames-h (type &rest _) + (treemacs--remove-treemacs-window-in-new-frames type))) + (set-popup-rule! "^ ?\\*Treemacs" :ignore t) (when +treemacs-git-mode ;; If they aren't supported, fall back to simpler methods