Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- coffee-mode.el 2011-09-08 14:52:36.000000000 +0900
- +++ my-coffee-mode.el 2011-09-08 14:54:21.000000000 +0900
- @@ -99,6 +99,12 @@
- :type 'string
- :group 'coffee)
- +(defcustom js2coffee-command "js2coffee"
- + "The js2coffee command used for evaluating code. Must be in your
- +path."
- + :type 'string
- + :group 'coffee)
- +
- (defcustom coffee-args-repl '("-i")
- "The command line arguments to pass to `coffee-command' to start a REPL."
- :type 'list
- @@ -234,6 +240,23 @@
- (funcall coffee-js-mode)
- (goto-char (point-min)))
- +
- +(defun coffee-js2coffee-region (start end)
- + "Compiles a region and displays the JS in another buffer."
- + (interactive "r")
- +
- + (let ((buffer (get-buffer coffee-compiled-buffer-name)))
- + (when buffer
- + (kill-buffer buffer)))
- +
- + (call-process-region start end
- + js2coffee-command nil
- + (current-buffer)
- + )
- + (delete-region start end)
- + )
- +
- +
- (defun coffee-show-version ()
- "Prints the `coffee-mode' version."
- (interactive)
Add Comment
Please, Sign In to add comment