Skip to content

Commit 5574da3

Browse files
LemonBreezesclaude
andcommitted
fix(workspaces): update persp-mode & wrap deactivate-mark
Bump the persp-mode pin to the latest commit (fab4bf76927445d2e431f06e74572acba81f47d5). That version calls `persp-before-deactivate-functions' with three arguments (a 'frame/'window symbol, the frame-or-window, and the perspective), but `deactivate-mark' only accepts an optional FORCE argument, so adding it to the hook directly throws (wrong-number-of-arguments deactivate-mark 3). Wrap it in a function that swallows the hook arguments. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b3a1198 commit 5574da3

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

modules/ui/workspaces/config.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,12 @@ stored in `persp-save-dir'.")
210210
(advice-add #'persp-asave-on-exit :around #'+workspaces-autosave-real-buffers-a)
211211

212212
;; Fix #1973: visual selection surviving workspace changes
213-
(add-hook 'persp-before-deactivate-functions #'deactivate-mark)
213+
;; `persp-before-deactivate-functions' calls its hooks with three arguments,
214+
;; but `deactivate-mark' only accepts an optional FORCE argument, so passing
215+
;; it directly throws (wrong-number-of-arguments deactivate-mark 3). Wrap it.
216+
(add-hook! 'persp-before-deactivate-functions
217+
(defun +workspaces-deactivate-mark-h (&rest _)
218+
(deactivate-mark)))
214219

215220
;; Fix #1017: stop session persistence from restoring broken childframes.
216221
(add-hook 'persp-after-load-state-functions #'doom-kill-childframes-h)

modules/ui/workspaces/packages.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
;; -*- no-byte-compile: t; -*-
22
;;; ui/workspaces/packages.el
33

4-
;; REVIEW: persp-mode introduced breaking changes in later commits, but will be
5-
;; replaced soon; this is frozen in the meantime.
6-
(package! persp-mode :pin "40e9993a9711cba5fb56dfec81a507fabeba9668" :freeze t)
4+
;; REVIEW: persp-mode will be replaced soon; pinned in the meantime.
5+
(package! persp-mode :pin "fab4bf76927445d2e431f06e74572acba81f47d5" :freeze t)

0 commit comments

Comments
 (0)