Created
August 31, 2010 08:40
-
-
Save rpdillon/558735 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 random-dark-inspiration () | |
"Downloads a random (dark) Inspiration theme and evaluates it." | |
(interactive) | |
(let* ((num (number-to-string (+ 500000 (random 399999))))) | |
(inspiration num))) | |
(defun inspiration (num) | |
"Fetches and evaluates the specified color theme from Inspiration." | |
(interactive) | |
(let* ((buffer (url-retrieve-synchronously | |
(concat "http://inspiration.sweyla.com/code/emacs/inspiration" | |
num | |
".el")))) | |
(save-excursion | |
(set-buffer buffer) | |
(goto-char (point-min)) | |
(re-search-forward "^$" nil 'move) | |
(eval-region (point) (point-max)) | |
(kill-buffer (current-buffer)) | |
(funcall (intern-soft (concat "inspiration-" num)))))) | |
;Example | |
(inspiration "912804") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment