feature/workspaces: add +workspaces-on-switch-project-behavior #836

To control when a new workspace is created when switching projectile
projects.
This commit is contained in:
Henrik Lissner 2018-10-03 00:00:56 -04:00
parent 63b195b133
commit 6515efa19e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 13 additions and 1 deletions

View file

@ -25,6 +25,16 @@ new project directory.")
"The basename of the file to store single workspace perspectives. Will be
stored in `persp-save-dir'.")
(defvar +workspaces-on-switch-project-behavior 'non-empty
"Controls the behavior of workspaces when switching to a new project.
Can be one of the following:
t Always create a new workspace for the project
'non-empty Only create a new workspace if the current one has no buffers
associated with it.
nil Never create a new workspace on project switch.")
;; If emacs is passed --restore, restore the last session on startup. This is
;; used by the `+workspace/restart-emacs-then-restore' command.
(defun +workspaces-restore-last-session (&rest _)