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
|
:defer t
|
||||||
:init
|
:init
|
||||||
(defun +workspaces|init ()
|
(defun +workspaces|init ()
|
||||||
|
(add-hook 'after-make-frame-functions #'+workspaces|init-frame)
|
||||||
(require 'persp-mode)
|
(require 'persp-mode)
|
||||||
(persp-mode +1)
|
(unless (daemonp)
|
||||||
(+workspaces|init-frame (selected-frame))
|
(+workspaces|init-frame (selected-frame))))
|
||||||
(add-hook 'after-make-frame-functions #'+workspaces|init-frame))
|
|
||||||
|
|
||||||
(defun +workspaces|init-frame (frame)
|
(defun +workspaces|init-frame (frame)
|
||||||
|
(unless persp-mode
|
||||||
|
(persp-mode +1))
|
||||||
(unless noninteractive
|
(unless noninteractive
|
||||||
(let (persp-before-switch-functions persp-activated-functions)
|
(let (persp-before-switch-functions persp-activated-functions)
|
||||||
(with-selected-frame frame
|
(with-selected-frame frame
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue