Skip to content

Instantly share code, notes, and snippets.

@v2e4lisp
Created January 6, 2013 15:30
Show Gist options
  • Save v2e4lisp/4467928 to your computer and use it in GitHub Desktop.
Save v2e4lisp/4467928 to your computer and use it in GitHub Desktop.
plist-to-alist fix the bug of the color-theme for emacs 24
(defun plist-to-alist (the-plist)
(defsubst get-tuple-from-plist (the-plist)
(when the-plist
(cons (car the-plist) (cadr the-plist))))
(let ((alist '()))
(while the-plist
(add-to-list 'alist (get-tuple-from-plist the-plist))
(setq the-plist (cddr the-plist)))
alist))
(plist-to-alist '(1 2 1 3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment