Created
March 24, 2010 01:20
-
-
Save burke/341879 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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