From 14fb49335c9040737ff54faf76504a4353f085df Mon Sep 17 00:00:00 2001 From: Igor Khomyakov Date: Thu, 8 Jan 2015 12:17:25 +0300 Subject: [PATCH] Added conditilan prefix thanks to @sellout Fixed CL functions --- solarized-definitions.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/solarized-definitions.el b/solarized-definitions.el index e169246..1a8d7ac 100644 --- a/solarized-definitions.el +++ b/solarized-definitions.el @@ -1,5 +1,9 @@ (eval-when-compile - (require 'cl)) + (unless (require 'cl-lib nil t) + (require 'cl) + (defalias 'cl-case 'case) + (defalias 'cl-copy-list 'copy-list)) + ) (defconst solarized-description "Color theme by Ethan Schoonover, created 2011-03-24. @@ -89,7 +93,7 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further." (defun solarized-face-for-index (facespec index &optional light) "Creates a face from facespec where the colors use the names from `solarized-colors`." - (let ((new-fontspec (copy-list facespec))) + (let ((new-fontspec (cl-copy-list facespec))) (dolist (property '(:foreground :background :color)) (let ((color-name (plist-get new-fontspec property))) (when color-name @@ -106,7 +110,7 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further." (setf color-name 'base03)) (when light (setf color-name - (case color-name + (cl-case color-name (base03 'base3) (base02 'base2) (base01 'base1) @@ -274,7 +278,7 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further." (custom-state (,@fg-green)) (custom-variable-tag (,@fg-base1)) ;; diff - DiffAdd, DiffChange, DiffDelete, and DiffText - ,@(case solarized-diff-mode + ,@(cl-case solarized-diff-mode (high `((diff-added (,@fmt-revr ,@fg-green)) (diff-changed (,@fmt-revr ,@fg-yellow))