mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user