Permalink
Browse files

Initial commit. A lunchtime hack - I shall try to rewrite it tomorrow.

  • Loading branch information...
0 parents commit 89a93e5f40d9fb0b37a916da9025a99584566bdb MayDaniel committed Sep 20, 2010
Showing with 28 additions and 0 deletions.
  1. +28 −0 cake.el
@@ -0,0 +1,28 @@
+(require 'cl)
+
+(defgroup cake nil
+ "Run Cake commands from Emacs."
+ :prefix "cake-"
+ :group 'applications)
+
+(defun cake-command (args)
+ (interactive "sArguments: ")
+ (compile (concat "cake " args)))
+
+(defmacro defun-cake-task (task)
+ `(defun ,(intern (concat "cake-" task)) ()
+ (interactive)
+ (cake-command ,task)))
+
+(defmacro defun-cake-interactive-task (task)
+ `(defun ,(intern (concat "cake-" task)) (args)
+ (interactive "sArguments: ")
+ (cake-command (concat ,task " " args))))
+
+(dolist (task '(compile deps clean deps autotest jar uberjar bin install release upgrade war uberwar version kill stop restart reload ps kill autodoc))
+ (eval `(defun-cake-task ,(symbol-name task))))
+
+(dolist (task '(help run test eval filter swank))
+ (eval `(defun-cake-interactive-task ,(symbol-name task))))
+
+(provide 'cake)

0 comments on commit 89a93e5

Please sign in to comment.