From e316a1450b91b3e5c4fef891809a7ad543126ab0 Mon Sep 17 00:00:00 2001 From: lxsameer Date: Thu, 26 May 2011 15:37:30 +0430 Subject: [PATCH] cleanup added --- src/plugins/django.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/plugins/django.el b/src/plugins/django.el index 30bcaae..1aeccb7 100644 --- a/src/plugins/django.el +++ b/src/plugins/django.el @@ -175,6 +175,24 @@ binding for Kuso IDE django plugin" (interactive "sEnter command: ") (manage-command "*Custom*" "custom" command) ) + + +(defun django/cleanup () + "Remove all the unneecessary files form project." + (interactive) + (let (buffer commands) + (if (string= project-path "") + (get-project-path) + ) + (setq commands "rm -fv `find @@pp@@ -iname \"*.pyc\"` && rm -fv `find @@pp@@ -iname \"*~\"` && rm -fv `find @@pp@@ -iname \"\.#*\"` && rm -vf `find @@pp@@ -iname \"#*\"`") + (setq commands (replace-regexp-in-string "@@pp@@" project-path commands)) + (setq buffer (get-buffer-create "*Cleanup*")) + (switch-to-buffer buffer) + (start-process-shell-command "Cleanup" buffer commands) + ) + + ) + ;; ---------------------------------------------------------------------- ;; Minor Modes ;; ----------------------------------------------------------------------