core: Revert dotfile installation time and fix editing style bug

Force a call to dotspacemacs/init after dotfile installtion.
Move call to (spacemacs/maybe-install-dotfile) to spacemacs/init.
This commit is contained in:
syl20bnr 2016-11-07 10:37:38 -05:00
parent caca16052a
commit 2c4cd4dd42
3 changed files with 12 additions and 5 deletions

View File

@ -556,13 +556,16 @@ If ARG is non nil then Ask questions to the user before installing the dotfile."
(write-file dotspacemacs-filepath)
(message "%s has been installed." dotspacemacs-filepath)
t))))
(load-file dotspacemacs-filepath))
(dotspacemacs/load-file)
;; force new wizard values to be applied
(dotspacemacs/init))
(defun dotspacemacs/load-file ()
"Load ~/.spacemacs if it exists."
(let ((dotspacemacs (dotspacemacs/location)))
(if (file-exists-p dotspacemacs)
(unless (with-demoted-errors "Error loading .spacemacs: %S" (load dotspacemacs))
(unless (with-demoted-errors "Error loading .spacemacs: %S"
(load dotspacemacs))
(dotspacemacs/safe-load)))))
(defun dotspacemacs/safe-load ()

View File

@ -136,7 +136,9 @@ the final step of executing code in `emacs-startup-hook'.")
"with this build.")))
;; check for new version
(if dotspacemacs-mode-line-unicode-symbols
(setq-default spacemacs-version-check-lighter "[⇪]")))
(setq-default spacemacs-version-check-lighter "[⇪]"))
;; install the dotfile if required
(spacemacs/maybe-install-dotfile))
(defun spacemacs//removes-gui-elements ()
"Remove the menu bar, tool bar and scroll bars."
@ -155,7 +157,10 @@ the final step of executing code in `emacs-startup-hook'.")
(defun spacemacs/maybe-install-dotfile ()
"Install the dotfile if it does not exist."
(unless (file-exists-p dotspacemacs-filepath)
(dotspacemacs/install 'with-wizard)))
(spacemacs-buffer/set-mode-line "Dotfile wizard installer")
(spacemacs//redisplay)
(when (dotspacemacs/install 'with-wizard)
(configuration-layer/sync))))
(defun spacemacs/display-and-copy-version ()
"Echo the current spacemacs version and copy it."

View File

@ -26,7 +26,6 @@
(load-file (concat (file-name-directory load-file-name)
"core/core-load-paths.el"))
(require 'core-spacemacs)
(spacemacs/maybe-install-dotfile)
(spacemacs/init)
(configuration-layer/sync)
(spacemacs-buffer/display-startup-note)