diff --git a/core/core-themes-support.el b/core/core-themes-support.el index 4617f2e6c..5450b6bfc 100644 --- a/core/core-themes-support.el +++ b/core/core-themes-support.el @@ -121,7 +121,6 @@ package name does not match theme name + `-theme' suffix.") " Some processing that needs to be done when the current theme has been changed to THEME." (interactive) - ;; Define a face for each state (if (fboundp 'spacemacs/set-state-faces) (spacemacs/set-state-faces)) (if (fboundp 'spacemacs/set-flycheck-mode-line-faces) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index d5fb7b673..549394f70 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -503,6 +503,14 @@ which require an initialization must be listed explicitly in the list.") (use-package evil :init (progn + (defvar spacemacs-evil-cursor-colors '((normal . "DarkGoldenrod2") + (insert . "chartreuse3") + (emacs . "SkyBlue2") + (visual . "gray") + (motion . "plum3") + (lisp . "HotPink1")) + "Colors assigned to evil states.") + (defun spacemacs/state-color-face (state) "Return the symbol of the face for the given STATE." (intern (format "spacemacs-%s-face" (symbol-name state)))) @@ -540,12 +548,7 @@ which require an initialization must be listed explicitly in the list.") (defun spacemacs/set-state-faces () "Define or set the state faces." (mapcar (lambda (x) (spacemacs/defface-state-color (car x) (cdr x))) - '((normal . "DarkGoldenrod2") - (insert . "chartreuse3") - (emacs . "SkyBlue2") - (visual . "gray") - (motion . "plum3") - (lisp . "HotPink1")))) + spacemacs-evil-cursor-colors)) (spacemacs/set-state-faces) (defun set-default-evil-emacs-state-cursor () @@ -569,14 +572,6 @@ which require an initialization must be listed explicitly in the list.") (set-default-evil-motion-state-cursor) (set-default-evil-lisp-state-cursor) - (defun spacemacs/set-evil-cursor-color (state color) - "Change the evil cursor COLOR for STATE." - (let ((face (intern (format "spacemacs-%s-face" (symbol-name state)))) - (func (intern (format "set-default-evil-%s-state-cursor" - (symbol-name state))))) - (set-face-attribute face nil :background color) - (funcall func))) - (evil-mode 1)) :config (progn