some functionality moved to kuso mode

This commit is contained in:
lxsameer 2011-05-29 13:28:09 +04:30
parent e316a1450b
commit aa57cbf238
2 changed files with 31 additions and 17 deletions

View File

@ -16,6 +16,12 @@
;; This file will define the most popular modes for KusoIDE
;; -------------------------------------------------------------------
;; Variables
;; -------------------------------------------------------------------
(defvar project-path ""
"Project source tree path.")
;; ---------------------------------------------------------------------
;; Hooks
;; ---------------------------------------------------------------------
@ -79,6 +85,31 @@ can define their key bindings easily."
;; ----------------------------------------------------------------------
;; Functions
;; ----------------------------------------------------------------------
(defun get-project-path ()
"Get the project path."
(setq project-path (read-directory-name "Project source tree: "))
)
(defun kuso/get-todo ()
"Get a list of TODO entries from the project source tree"
(interactive)
)
(defun kuso/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

View File

@ -176,23 +176,6 @@ binding for Kuso IDE django plugin"
(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
;; ----------------------------------------------------------------------