Clean up prelude-coffee.el
This commit is contained in:
parent
91f53c10ca
commit
ca4797da79
1 changed files with 4 additions and 15 deletions
|
@ -33,29 +33,18 @@
|
|||
;;; Code:
|
||||
|
||||
(require 'prelude-programming)
|
||||
(prelude-require-package 'coffee-mode)
|
||||
|
||||
(eval-after-load 'coffee-mode
|
||||
'(progn
|
||||
;; CoffeeScript uses two spaces.
|
||||
(setq coffee-tab-width 2)
|
||||
|
||||
;; If you don't have js2-mode
|
||||
(setq coffee-js-mode 'javascript-mode)
|
||||
|
||||
;; If you don't want your compiled files to be wrapped
|
||||
(setq coffee-args-compile '("-c" "--bare"))
|
||||
|
||||
;; *Messages* spam
|
||||
(setq coffee-debug-mode t)
|
||||
|
||||
;; Emacs key binding
|
||||
(define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer)
|
||||
|
||||
(setq coffee-command "coffee")
|
||||
;; remove the "Generated by CoffeeScript" header
|
||||
(add-to-list 'coffee-args-compile "--no-header")
|
||||
|
||||
(defun prelude-coffee-mode-defaults ()
|
||||
"coffee-mode-defaults"
|
||||
;; Compile '.coffee' files on every save
|
||||
;; Update the already compiled js on save
|
||||
(and (buffer-file-name)
|
||||
(file-exists-p (buffer-file-name))
|
||||
(file-exists-p (coffee-compiled-file-name (buffer-file-name)))
|
||||
|
|
Loading…
Reference in a new issue