Ensure new workspace/layout only shows home buffer

Previous code would show two windows when invoked from a window that is
dedicated to its buffer: the home buffer and the dedicated buffer.
This commit is contained in:
bmag 2016-01-27 11:23:29 +02:00 committed by syl20bnr
parent 4dc291bfb4
commit 407f98a1c8
3 changed files with 9 additions and 2 deletions

View File

@ -416,6 +416,13 @@ argument takes the kindows rotate backwards."
(defalias 'spacemacs/home 'spacemacs-buffer/goto-buffer
"Go to home Spacemacs buffer")
(defun spacemacs/home-delete-other-windows ()
"Open home Spacemacs buffer and delete other windows.
Useful for making the home buffer the only visible buffer in the frame."
(interactive)
(spacemacs/home)
(delete-other-windows))
(defun spacemacs/insert-line-above-no-indent (count)
(interactive "p")
(let ((p (+ (point) count)))

View File

@ -15,7 +15,7 @@
(use-package eyebrowse
:init
(progn
(setq eyebrowse-new-workspace #'spacemacs/home
(setq eyebrowse-new-workspace #'spacemacs/home-delete-other-windows
eyebrowse-wrap-around t)
(eyebrowse-mode)

View File

@ -167,7 +167,7 @@
"Do you want to create one? "))
(let ((persp-reset-windows-on-nil-window-conf t))
(persp-switch nil)
(spacemacs/home))))))
(spacemacs/home-delete-other-windows))))))
;; Define all `spacemacs/persp-switch-to-X' functions
(dolist (i (number-sequence 9 0 -1))