diff --git a/fg42 b/fg42 index 0a1507b..7fb0df8 100755 --- a/fg42 +++ b/fg42 @@ -4,4 +4,4 @@ export FG42_HOME=$HOME/src/FG42/FG42 #emacs -Q --no-splash --name FG42 --title FG42 -q -l --PATH--/fg42-config.el "$@" -emacs-snapshot --name FG42 -Q -q --no-splash --title FG42 -l $FG42_HOME/fg42-config.el "$@" +emacs-snapshot --name FG42 -q --no-site-file --no-site-lisp --no-splash --title FG42 -l $FG42_HOME/fg42-config.el "$@" diff --git a/lib/extensions/arduino/init.el b/lib/extensions/arduino/init.el index 1e3338b..4c6aab3 100644 --- a/lib/extensions/arduino/init.el +++ b/lib/extensions/arduino/init.el @@ -4,15 +4,32 @@ ;;;###autoload (defun create-makefile () - "Create the arduino make file in the same directory as the ino file if doesn't exits" + "Create the arduino make file in the same directory as the ino file if doesn't exits." (let ((makefile (concat (file-name-directory buffer-file-name) "Makefile")) (makefile-src (concat fg42-home "/lib/extensions/arduino/Makefile"))) - (message "asdasdasd") - (message makefile-src) (if (not (file-exists-p makefile)) (progn (message "Creating arduino make file") (copy-file makefile-src makefile))))) +;;;###autoload +(defun compile-arduino () + "Compile the current arduino project." + (interactive) + (recompile)) + +;;;###autoload +(defun compile-arduino () + "Compile the current arduino project." + (interactive) + (recompile)) + +;;;###autoload +(defun compile-and-upload-arduino () + "Compile and upload the current arduino project." + (compile-arduino) + (let (compile-command "make upload") + (recompile))) + ;;;###autoload (defun extensions/arduino-initialize () "Arduino development plugin initialization." @@ -22,6 +39,9 @@ "Gives FG42 the ability to edit arduino related contents." (add-hook 'arduino-mode-hook 'create-makefile) (setq auto-mode-alist (cons '("\\.\\(pde\\|ino\\)$" . arduino-mode) auto-mode-alist)) + + (global-set-key (kbd "C-c c") 'compile-arduino) + (global-set-key (kbd "C-c u") 'compile-and-upload-arduino) (autoload 'arduino-mode "arduino-mode" "Arduino editing mode." t)))