mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Restore workspaces on --restore later
doom-post-init-hook isn't late enough.
This commit is contained in:
@ -29,7 +29,7 @@ stored in `persp-save-dir'.")
|
|||||||
;; If emacs is passed --restore, restore the last session on startup. This is
|
;; If emacs is passed --restore, restore the last session on startup. This is
|
||||||
;; particularly useful for the `+workspace/restart-emacs-then-restore' command.
|
;; particularly useful for the `+workspace/restart-emacs-then-restore' command.
|
||||||
(defun +workspaces-restore-last-session (&rest _)
|
(defun +workspaces-restore-last-session (&rest _)
|
||||||
(add-hook 'doom-post-init-hook #'+workspace/load-session 'append))
|
(add-hook 'emacs-startup-hook #'+workspace/load-session 'append))
|
||||||
(map-put command-switch-alist "--restore" #'+workspaces-restore-last-session)
|
(map-put command-switch-alist "--restore" #'+workspaces-restore-last-session)
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user