color-theme-retro-green on Emacs 24

Wonder if anyone is using color-theme anymore; seems like wasted effort to just bail on all of the great themes in there. Today I wanted to get color-theme-retro-green at least working, and here is what it took against 6.5.5 of the Marmalade release:

(defun gcr/plist-to-alist (ls)
  "Convert a plist to an alist. Primarily for old color-theme themes."
  (let ((result nil))
    (while ls
      (add-to-list 'result (cons (car ls) (cadr ls)))
      (setq ls (cddr ls)))
    result))
(defalias 'plist-to-alist 'gcr/plist-to-alist)

Make a change in color-theme.el’s color-theme-retro-green to initialize face and faces with an empty list:

 ;; Build a list of faces without parameters
  (let ((old-faces (face-list))
        (faces '())
        (face '())
        (foreground (or color "green")))

Didn’t find a Github project to submit a patch so I emailed the owner.

One thought on “color-theme-retro-green on Emacs 24”

  1. If you don’t mind using common lisp style you can do it more concisely:
    (defun p-to-a (plist)
    (loop for (k v) on plist by #’cddr collect (cons k v)))

Leave a Reply

Your email address will not be published. Required fields are marked *