feature/workspaces: fix hash-table-p error on startup in daemon Emacs
Because persp-mode initializes differently (and later) in daemon/noninteractive Emacs, +workspaces|init would fail while trying to use persp-mode features in a broken state.
This commit is contained in:
parent
55cd9817ef
commit
834e92c465
1 changed files with 5 additions and 3 deletions
|
@ -25,12 +25,14 @@ renamed.")
|
|||
:defer t
|
||||
:init
|
||||
(defun +workspaces|init ()
|
||||
(add-hook 'after-make-frame-functions #'+workspaces|init-frame)
|
||||
(require 'persp-mode)
|
||||
(persp-mode +1)
|
||||
(+workspaces|init-frame (selected-frame))
|
||||
(add-hook 'after-make-frame-functions #'+workspaces|init-frame))
|
||||
(unless (daemonp)
|
||||
(+workspaces|init-frame (selected-frame))))
|
||||
|
||||
(defun +workspaces|init-frame (frame)
|
||||
(unless persp-mode
|
||||
(persp-mode +1))
|
||||
(unless noninteractive
|
||||
(let (persp-before-switch-functions persp-activated-functions)
|
||||
(with-selected-frame frame
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue