 (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.

                (custom-state (,@fg-green))
                (custom-variable-tag (,@fg-base1))
                ;; diff - DiffAdd, DiffChange, DiffDelete, and DiffText
                ,@(case solarized-diff-mode
                    (high
                     `((diff-added (,@fmt-revr ,@fg-green))
                       (diff-changed (,@fmt-revr ,@fg-yellow))

(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 (cl-copy-list facespec)))
    (dolist (property '(:foreground :background :color))
      (let ((color-name (plist-get new-fontspec property)))
        (when color-name
