From 2c4cd4dd42cf478eeeb8c08d622316f5a91c86bb Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Mon, 7 Nov 2016 10:37:38 -0500 Subject: [PATCH] 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. --- core/core-dotspacemacs.el | 7 +++++-- core/core-spacemacs.el | 9 +++++++-- init.el | 1 - 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el index 325e92809..cc6ab68cc 100644 --- a/core/core-dotspacemacs.el +++ b/core/core-dotspacemacs.el @@ -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 () diff --git a/core/core-spacemacs.el b/core/core-spacemacs.el index 4aaf82243..c2251d9a4 100644 --- a/core/core-spacemacs.el +++ b/core/core-spacemacs.el @@ -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." diff --git a/init.el b/init.el index 44625835d..75c2d9aef 100644 --- a/init.el +++ b/init.el @@ -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)