From 6ae2fbcfa959ef59cea9dca78b4aea3ddb6c5321 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Wed, 23 Nov 2016 16:32:10 -0500 Subject: [PATCH] core: use an advice to write custom settings to dotfile Should fix #7816 --- core/core-custom-settings.el | 2 ++ core/core-spacemacs.el | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-custom-settings.el b/core/core-custom-settings.el index a8763b567..7fe2dd525 100644 --- a/core/core-custom-settings.el +++ b/core/core-custom-settings.el @@ -92,4 +92,6 @@ This function is called at the very end of Spacemacs initialization.\"\n") (save-buffer) (kill-buffer (current-buffer))))) +(advice-add 'custom-save-all :after #'spacemacs/write-custom-settings-to-dotfile) + (provide 'core-custom-settings) diff --git a/core/core-spacemacs.el b/core/core-spacemacs.el index f8dcc3ae6..c84c4592d 100644 --- a/core/core-spacemacs.el +++ b/core/core-spacemacs.el @@ -78,7 +78,6 @@ the final step of executing code in `emacs-startup-hook'.") ;; overlapped in terminal mode. The GUI specific `' is used ;; instead. evil-want-C-i-jump nil) - (spacemacs/write-custom-settings-to-dotfile) (dotspacemacs/load-file) (require 'core-configuration-layer) (dotspacemacs|call-func dotspacemacs/init "Calling dotfile init...")