forked from FG42/FG42
keybindings for compile and upload added
This commit is contained in:
parent
9992fe2973
commit
c936e2a9f5
2
fg42
2
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 "$@"
|
||||
|
|
|
@ -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)))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue