Fix startup buffers without spaceline mode line

This commit is contained in:
syl20bnr 2018-06-14 01:10:44 -04:00
parent 18d397a98a
commit de858b2953
3 changed files with 6 additions and 8 deletions

View file

@ -521,7 +521,7 @@ Called with `C-u C-u' skips `dotspacemacs/user-config' _and_ preleminary tests."
(spacemacs-buffer/warning "Some tests failed, check `%s' buffer"
dotspacemacs-test-results-buffer))))))
(when (configuration-layer/package-used-p 'spaceline)
(spacemacs//set-powerline-for-startup-buffers)))
(spacemacs//restore-buffers-powerline)))
(defun dotspacemacs/get-variable-string-list ()
"Return a list of all the dotspacemacs variables as strings."

View file

@ -49,12 +49,10 @@ Return nil if no scale is defined."
(powerline-set-selected-window)
(powerline-reset)))
(defun spacemacs//set-powerline-for-startup-buffers ()
"Set the powerline for buffers created when Emacs starts."
(dolist (buffer '("*Messages*" "*spacemacs*" "*Compile-Log*"))
(when (and (get-buffer buffer)
(configuration-layer/package-used-p 'spaceline))
(spacemacs//restore-powerline buffer))))
(defun spacemacs//restore-buffers-powerline ()
"Restore the powerline in all buffers."
(dolist (buffer (buffer-list))
(spacemacs//restore-powerline buffer)))
(defun spacemacs//prepare-diminish ()
(when spaceline-minor-modes-p

View file

@ -140,7 +140,7 @@
(spaceline-info-mode t))
;; Enable spaceline for buffers created before the configuration of
;; spaceline
(spacemacs//set-powerline-for-startup-buffers))))
(spacemacs//restore-buffers-powerline))))
(defun spacemacs-modeline/pre-init-spaceline-all-the-icons ()
(when (eq 'all-the-icons (spacemacs/get-mode-line-theme-name))