Restore workspaces on --restore later

doom-post-init-hook isn't late enough.
This commit is contained in:
Henrik Lissner 2018-06-19 16:43:51 +02:00
parent af350aa09e
commit c9014487b1
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -29,7 +29,7 @@ stored in `persp-save-dir'.")
;; If emacs is passed --restore, restore the last session on startup. This is
;; particularly useful for the `+workspace/restart-emacs-then-restore' command.
(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)
;;