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

            (setf color-name 'base03))
          (when light
            (setf color-name
                  (case color-name
                    (base03 'base3)
                    (base02 'base2)
                    (base01 'base1)

(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
