Commit 6ff0e2db00261b8fb66820297a0b3cb7b4b72b44
- Diff rendering mode:
- inline
- side by side
README
(12 / 0)
|   | |||
| 1 | 1 | Processing mode for Emacs. | |
| 2 | 2 | Written by Rudolf Olah. | |
| 3 | 3 | ||
| 4 | == About & Usage == | ||
| 5 | |||
| 4 | 6 | This mode is a derivative of the java-mode. It adds key-bindings for | |
| 5 | 7 | running/compiling Processing sketches and it also highlights keywords | |
| 6 | 8 | found in the Processing language, such as ``setup'', ``draw'', and | |
| … | … | ||
| 18 | 18 | install the YASnippet package found here: | |
| 19 | 19 | ||
| 20 | 20 | http://code.google.com/p/yasnippet/ | |
| 21 | |||
| 22 | == Bugs == | ||
| 23 | |||
| 24 | * Compilation...there is a bug in the compilation because the | ||
| 25 | Commander class of Processing does not accept the ``--preferences'' | ||
| 26 | option. The workaround is to copy your ``preferences.txt'' from your | ||
| 27 | home directory (in Linux it can be found in ``~/.processing/'') to | ||
| 28 | the sketch directory. You will have to create a sub-directory called | ||
| 29 | ``lib'' in the sketch directory which is where the | ||
| 30 | ``preferences.txt'' file will reside. Sym-linking also works. |
processing-mode.el
(23 / 15)
|   | |||
| 57 | 57 | must be set to one of \"windows\", \"macosx\", or \"linux\". If | |
| 58 | 58 | no platform is selected, the default platform that Emacs is | |
| 59 | 59 | running on will be selected." | |
| 60 | (cd (expand-file-name processing-location)) | ||
| 61 | (compile (concat "./java/bin/java -classpath \"" | ||
| 62 | (apply 'make-java-classpath | ||
| 63 | '("./java/lib/rt.jar" | ||
| 64 | "./java/lib/tools.jar" | ||
| 65 | "./lib/antlr.jar" "./lib/core.jar" | ||
| 66 | "./lib/ecj.jar" "./lib/jna.jar" | ||
| 67 | "./lib/pde.jar")) | ||
| 68 | "\" processing.app.Commander" | ||
| 69 | " --sketch=\"" (expand-file-name sketch-dir) | ||
| 70 | "\" --output=\"" (expand-file-name output-dir) | ||
| 71 | "\" --" cmd | ||
| 72 | (if (string= cmd "export-application") | ||
| 73 | (concat " --platform=" | ||
| 74 | (if platform platform (processing-platform))))))) | ||
| 60 | ;;(cd (expand-file-name processing-location)) | ||
| 61 | (compile (concat processing-location "java/bin/java -classpath \"" | ||
| 62 | (apply 'make-java-classpath | ||
| 63 | (mapcar (lambda (x) (expand-file-name (concat processing-location x))) | ||
| 64 | '("java/lib/rt.jar" | ||
| 65 | "java/lib/tools.jar" | ||
| 66 | "lib/antlr.jar" "lib/core.jar" | ||
| 67 | "lib/ecj.jar" "lib/jna.jar" | ||
| 68 | "lib/pde.jar"))) | ||
| 69 | "\" processing.app.Commander" | ||
| 70 | " --sketch=\"" (expand-file-name sketch-dir) | ||
| 71 | "\" --output=\"" (expand-file-name output-dir) | ||
| 72 | ;; Remove this comment when Processing implements the --preferences=??? command-line option. | ||
| 73 | ;;"\" --preferences=\"" (expand-file-name "~/.processing/preferences.txt") | ||
| 74 | "\" --" cmd | ||
| 75 | (if (string= cmd "export-application") | ||
| 76 | (concat " --platform=" | ||
| 77 | (if platform platform (processing-platform))))))) | ||
| 75 | 78 | ||
| 76 | 79 | (defun processing-sketch-compile (&optional cmd) | |
| 77 | 80 | "Runs the Processing Commander application with the current | |
| … | … | ||
| 103 | 103 | (define-key processing-mode-map "\C-c\C-r" 'processing-sketch-compile) | |
| 104 | 104 | (define-key processing-mode-map "\C-c\C-p" 'processing-sketch-present) | |
| 105 | 105 | (define-key processing-mode-map "\C-c\C-b" 'processing-sketch-build) | |
| 106 | |||
| 107 | ;; Regular expressions | ||
| 108 | ;; For compilation | ||
| 109 | ;;(pushnew compilation-error-regexp-alist | ||
| 110 | ;; '(processing "^\\(?:[[:alpha:]]\\)")) | ||
| 106 | 111 | ||
| 107 | 112 | ;; Font-lock, keywords | |
| 108 | 113 | (defconst processing-font-lock-keywords-1 |

