Skip to content

Instantly share code, notes, and snippets.

@burke
Created March 24, 2010 01:20
Show Gist options
  • Save burke/341879 to your computer and use it in GitHub Desktop.
Save burke/341879 to your computer and use it in GitHub Desktop.
(defun color-theme-random ()
(interactive)
(let* ((theme-number (number-to-string (random 999999999)))
(buffer (url-retrieve-synchronously (concat "http://inspiration.sweyla.com/code/emacs/inspiration" theme-number ".el"))))
(set-buffer buffer)
(beginning-of-buffer)
(replace-string (concat "inspiration-" theme-number) "color-theme-install-random")
(delete-region (point-min) url-http-end-of-headers)
(eval-buffer buffer)
(color-theme-install-random)
(setq *current-color-theme* theme-number)))
(global-set-key [f5] 'color-theme-random)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment