From 0dcd3406374e65b199064ef9cf28e0f5ff4acb9c Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 25 Jan 2015 23:40:07 -0500 Subject: [PATCH] Add variable `colors-enable-rainbow-delimiters` to colors layer By default the value is `nil` --- contrib/colors/config.el | 16 ++++++++++++---- contrib/colors/packages.el | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/contrib/colors/config.el b/contrib/colors/config.el index d100b7a60..a6af6c872 100644 --- a/contrib/colors/config.el +++ b/contrib/colors/config.el @@ -14,8 +14,16 @@ ;; Prefixes ;; --------------------------------------------------------------------------- -(setq spacemacs/key-binding-prefixes '(("C" . "colors") - ("Ci" . "colors-identifiers") - ("tC" . "toggles-colors"))) +;; Variables + +(defvar colors-enable-rainbow-identifiers nil + "If non nil the `rainbow-identifers' package is enabled.") + +;; Command prefixes + +(setq colors/key-binding-prefixes '(("C" . "colors") + ("tC" . "toggles-colors"))) +(when colors-enable-rainbow-identifiers + (push (cons "Ci" "colors-identifiers") colors/key-binding-prefixes)) (mapc (lambda (x) (spacemacs/declare-prefix (car x) (cdr x))) - spacemacs/key-binding-prefixes) + colors/key-binding-prefixes) diff --git a/contrib/colors/packages.el b/contrib/colors/packages.el index 3c7b2c2cc..6d3d4940b 100644 --- a/contrib/colors/packages.el +++ b/contrib/colors/packages.el @@ -15,12 +15,14 @@ ;; not working well for now ;; rainbow-blocks rainbow-delimiters - rainbow-identifiers rainbow-mode ) "List of all packages to install and/or initialize. Built-in packages which require an initialization must be listed explicitly in the list.") +(when colors-enable-rainbow-identifiers + (push 'rainbow-identifiers colors-packages)) + (defun colors/init-rainbow-blocks () (use-package rainbow-blocks :disabled t