diff --git a/core/core-spacemacs.el b/core/core-spacemacs.el index bcb393044..b7db5a20e 100644 --- a/core/core-spacemacs.el +++ b/core/core-spacemacs.el @@ -219,7 +219,15 @@ FILE-TO-LOAD is an explicit file to load after the installation." (lambda () ;; Ultimate configuration decisions are given to the user who can defined ;; them in his/her ~/.spacemacs file - (dotspacemacs|call-func dotspacemacs/config "Calling dotfile config...") + ;; TODO remove support for dotspacemacs/config in 0.105 + (if (fboundp 'dotspacemacs/user-config) + (dotspacemacs|call-func dotspacemacs/user-config + "Calling dotfile user config...") + (spacemacs-buffer/warning (concat "`dotspacemacs/config' is deprecated, " + "please rename your function to " + "`dotspacemacs/user-config'")) + (dotspacemacs|call-func dotspacemacs/config + "Calling dotfile user config...")) ;; from jwiegley ;; https://github.com/jwiegley/dot-emacs/blob/master/init.el (let ((elapsed (float-time diff --git a/core/templates/.spacemacs.template b/core/templates/.spacemacs.template index a14b3e850..8fdefeab9 100644 --- a/core/templates/.spacemacs.template +++ b/core/templates/.spacemacs.template @@ -3,7 +3,9 @@ ;; It must be stored in your home directory. (defun dotspacemacs/layers () - "Configuration Layers declaration." + "Configuration Layers declaration. +You should not put any user code in this function besides modifying the variable +values." (setq-default ;; List of additional paths where to look for configuration layers. ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') @@ -45,7 +47,9 @@ (defun dotspacemacs/init () "Initialization function. This function is called at the very startup of Spacemacs initialization -before layers configuration." +before layers configuration. +You should not put any user code in there besides modifying the variable +values." ;; This setq-default sexp is an exhaustive list of all the supported ;; spacemacs settings. (setq-default @@ -162,13 +166,15 @@ before layers configuration." )) (defun dotspacemacs/user-init () - "Initialization function for user. Called immediately following `dotspacemacs/init'." + "Initialization function for user code. +It is called immediately after `dotspacemacs/init'. You are free to put any +user code." ) -(defun dotspacemacs/config () - "Configuration function. +(defun dotspacemacs/user-config () + "Configuration function for user code. This function is called at the very end of Spacemacs initialization after -layers configuration." +layers configuration. You are free to put any user code." ) ;; Do not write anything past this comment. This is where Emacs will