diff --git a/TODO b/TODO index f32ea08..bf07709 100644 --- a/TODO +++ b/TODO @@ -4,5 +4,6 @@ * Build the debian folder nad required files for deb packages * Escape project name for a unix name "shell-quote-argument" * Add a config file for user to put his/her configuration there +* Disable EDE and other unused menu * Allow templates file to store in subdirectories so new project can have subdirectories \ No newline at end of file diff --git a/src/lib/project.el b/src/lib/project.el index fb82090..ee1a859 100644 --- a/src/lib/project.el +++ b/src/lib/project.el @@ -96,6 +96,7 @@ ) ) + (defun insert-license () "Return the prepared license string." (if project-license diff --git a/src/plugins/cproject.el b/src/plugins/cproject.el index c727af5..1709290 100644 --- a/src/plugins/cproject.el +++ b/src/plugins/cproject.el @@ -45,6 +45,23 @@ (new-project) ) + +(defun compile () + "Run the make command and return the putput" + (interactive) + (let (output) + (setq output (shell-command-to-string "make")) + (message output) + ) +) + + +(defun init-key-bindings () + "Initialize the required key bindings for C/C++ project." + (define-key c-mode (kbd "\C-c \C-c") 'compile) +) + + (defun generic-c () "Create a generic type C project" (interactive) (c-new-project) @@ -60,5 +77,10 @@ (project/write-dest-file cur template-data) ) ) + (cd project-path) + (init-key-bindings) + (find-file (concat unix-project-name ".c")) ) + + (init-menus) \ No newline at end of file