Minor refactor of feature/workspaces

Improve error handling and update docstrings+comments
This commit is contained in:
Henrik Lissner 2018-06-19 14:59:41 +02:00
parent d979c46ea2
commit d5adf4ccbc
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 17 additions and 13 deletions

View file

@ -26,10 +26,11 @@ new project directory.")
"The basename of the file to store single workspace perspectives. Will be
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))
(map-put command-switch-alist '"--restore" #'+workspaces-restore-last-session)
(map-put command-switch-alist "--restore" #'+workspaces-restore-last-session)
;;
;; Plugins