[Fix #535] Correct coffee-mode's config
This commit is contained in:
parent
5366fdc3ea
commit
d3954749fa
1 changed files with 19 additions and 20 deletions
|
@ -36,9 +36,6 @@
|
||||||
|
|
||||||
(eval-after-load 'coffee-mode
|
(eval-after-load 'coffee-mode
|
||||||
'(progn
|
'(progn
|
||||||
(defun prelude-coffee-mode-defaults ()
|
|
||||||
"coffee-mode-defaults"
|
|
||||||
|
|
||||||
;; CoffeeScript uses two spaces.
|
;; CoffeeScript uses two spaces.
|
||||||
(setq coffee-tab-width 2)
|
(setq coffee-tab-width 2)
|
||||||
|
|
||||||
|
@ -54,14 +51,16 @@
|
||||||
;; Emacs key binding
|
;; Emacs key binding
|
||||||
(define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer)
|
(define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer)
|
||||||
|
|
||||||
;; Riding edge.
|
(setq coffee-command "coffee")
|
||||||
(setq coffee-command "~/dev/coffee")
|
|
||||||
|
|
||||||
|
(defun prelude-coffee-mode-defaults ()
|
||||||
|
"coffee-mode-defaults"
|
||||||
;; Compile '.coffee' files on every save
|
;; Compile '.coffee' files on every save
|
||||||
(and (buffer-file-name)
|
(and (buffer-file-name)
|
||||||
(file-exists-p (buffer-file-name))
|
(file-exists-p (buffer-file-name))
|
||||||
(file-exists-p (coffee-compiled-file-name (buffer-file-name)))
|
(file-exists-p (coffee-compiled-file-name (buffer-file-name)))
|
||||||
(coffee-cos-mode t)))
|
(coffee-cos-mode t))
|
||||||
|
(subword-mode +1))
|
||||||
|
|
||||||
(setq prelude-coffee-mode-hook 'prelude-coffee-mode-defaults)
|
(setq prelude-coffee-mode-hook 'prelude-coffee-mode-defaults)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue