mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -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
|
: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
|
||||||
|
Reference in New Issue
Block a user