             do (plist-put result key value)))
     result))
 
+(defun wandbox-json-read (string)
+  (let ((json-key-type 'string))
+    (json-read-from-string string)))
+
+(defun wandbox-json-load (src)
+  (wandbox-json-read (wandbox-fetch src)))
+
 (defun wandbox-fetch-compilers ()
-  (let ((json-key-type 'string))
-    (json-read-from-string
-     (wandbox-fetch "http://melpon.org/wandbox/api/list.json"))))
+  (wandbox-json-load "http://melpon.org/wandbox/api/list.json"))
 
 (defun wandbox-list-compilers ()
   (unless wandbox-compilers

    (setq profile (wandbox-merge-plist profile (apply f profile))))
  (wandbox-post (wandbox-build-request-data profile)))

;; see also: http://developer.github.com/v3/gists/
(defun wandbox-fetch-gist (id)
  "Get a single gist from ID."


(put 'wandbox-eval-with 'lisp-indent-function 1)

(defun wandbox-tweet (url)
  (browse-url (concat "https://twitter.com/intent/tweet?text=Wandbox&url="
                      (url-hexify-string url))))

;; [Tweet This]
;; (setq wandbox-permalink-function #'wandbox-tweet)

(provide 'wandbox)

;;; wandbox.el ends here
