Commit e13dc7efade9026072ebeffb51d2d65c7297566d

  • Tree SHA1: 288854f
  • Parent SHA1: cc04b18 (Removed empty functions, added interface to commander function in the form of processing-compile function)
  • raw diff | raw patch
Added a few key bindings and double-quotes around the output and sketch target directory names
  
6666 "./lib/ecj.jar" "./lib/jna.jar"
6767 "./lib/pde.jar"))
6868 "\" 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
7272 (if (string= cmd "export-application")
7373 (concat " --platform="
7474 (if platform platform (processing-platform)))))))
7575
76(defun processing-compile (&optional cmd)
76(defun processing-sketch-compile (&optional cmd)
7777 "Runs the Processing Commander application with the current
7878buffer. The output directory is the sub-directory ``output''
7979which will be found in the parent directory of the buffer file."
8282 (let ((sketch-dir (file-name-directory buffer-file-name)))
8383 (processing-commander sketch-dir (concat sketch-dir "output") (if cmd cmd "run"))))
8484
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
8593(defun processing-export-application ()
8694 "Turns the Processing sketch into a Java application. Assumes
8795that the platform target is whatever platform Emacs is running
9797 t)
9898
9999;; 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)
102103
103104;; Font-lock, keywords
104105(defconst processing-font-lock-keywords-1