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

@ -549,7 +549,9 @@ This be hooked to `projectile-after-switch-project-hook'."
(setq +workspaces--project-dir dir))
(when (and persp-mode +workspaces--project-dir)
(unwind-protect
(if (+workspace-buffer-list)
(if (and (not (null +workspaces-on-switch-project-behavior))
(or (eq +workspaces-on-switch-project-behavior t)
(+workspace-buffer-list)))
(let* (persp-p
(persp
(let ((project-name (doom-project-name +workspaces--project-dir)))