From 51c5de624dd47e996ad1e3fd0a750939ba7008dc Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 22 Mar 2015 03:02:15 -0400 Subject: [PATCH] Fix non activated package if there is no defined init function Fixes #898 --- core/core-configuration-layer.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/core-configuration-layer.el b/core/core-configuration-layer.el index 4adb8e3b3..555ff5432 100644 --- a/core/core-configuration-layer.el +++ b/core/core-configuration-layer.el @@ -585,11 +585,14 @@ to select one." "Initialize the package PKG from the configuration layers LAYERS." (dolist (layer layers) (condition-case err - (let* ((init-func (intern (format "%s/init-%s" layer pkg)))) - (when (and (package-installed-p pkg) (fboundp init-func)) - (spacemacs/message "Package: Initializing %s:%s..." layer pkg) + (let* ((init-func (intern (format "%s/init-%s" layer pkg))) + (msg (format "Package: Initializing %s:%s..." layer pkg))) + (when (package-installed-p pkg) (configuration-layer//activate-package pkg) - (funcall init-func) + (if (not (fboundp init-func)) + (spacemacs/message (concat msg " (no init function)")) + (spacemacs/message msg) + (funcall init-func)) (setq initializedp t))) ('error (configuration-layer//set-error)