Commit e13dc7efade9026072ebeffb51d2d65c7297566d
- Diff rendering mode:
- inline
- side by side
processing-mode.el
(15 / 6)
|   | |||
| 66 | 66 | "./lib/ecj.jar" "./lib/jna.jar" | |
| 67 | 67 | "./lib/pde.jar")) | |
| 68 | 68 | "\" processing.app.Commander" | |
| 69 | " --sketch=" (expand-file-name sketch-dir) | ||
| 70 | " --output=" (expand-file-name output-dir) | ||
| 71 | " --" cmd | ||
| 69 | " --sketch=\"" (expand-file-name sketch-dir) | ||
| 70 | "\" --output=\"" (expand-file-name output-dir) | ||
| 71 | "\" --" cmd | ||
| 72 | 72 | (if (string= cmd "export-application") | |
| 73 | 73 | (concat " --platform=" | |
| 74 | 74 | (if platform platform (processing-platform))))))) | |
| 75 | 75 | ||
| 76 | (defun processing-compile (&optional cmd) | ||
| 76 | (defun processing-sketch-compile (&optional cmd) | ||
| 77 | 77 | "Runs the Processing Commander application with the current | |
| 78 | 78 | buffer. The output directory is the sub-directory ``output'' | |
| 79 | 79 | which will be found in the parent directory of the buffer file." | |
| … | … | ||
| 82 | 82 | (let ((sketch-dir (file-name-directory buffer-file-name))) | |
| 83 | 83 | (processing-commander sketch-dir (concat sketch-dir "output") (if cmd cmd "run")))) | |
| 84 | 84 | ||
| 85 | (defun processing-sketch-present () | ||
| 86 | (interactive) | ||
| 87 | (processing-sketch-compile "present")) | ||
| 88 | |||
| 89 | (defun processing-sketch-build () | ||
| 90 | (interactive) | ||
| 91 | (processing-sketch-compile "build")) | ||
| 92 | |||
| 85 | 93 | (defun processing-export-application () | |
| 86 | 94 | "Turns the Processing sketch into a Java application. Assumes | |
| 87 | 95 | that the platform target is whatever platform Emacs is running | |
| … | … | ||
| 97 | 97 | t) | |
| 98 | 98 | ||
| 99 | 99 | ;; Key bindings | |
| 100 | (define-key processing-mode-map | ||
| 101 | "\C-c\C-r" 'processing-compile) | ||
| 100 | (define-key processing-mode-map "\C-c\C-r" 'processing-sketch-compile) | ||
| 101 | (define-key processing-mode-map "\C-c\C-p" 'processing-sketch-present) | ||
| 102 | (define-key processing-mode-map "\C-c\C-b" 'processing-sketch-build) | ||
| 102 | 103 | ||
| 103 | 104 | ;; Font-lock, keywords | |
| 104 | 105 | (defconst processing-font-lock-keywords-1 |

