Move coffeescript init to appropriate place

This commit is contained in:
syl20bnr 2014-11-16 22:44:45 -05:00
parent 50c9893ce7
commit 9234f47852

View file

@ -772,6 +772,23 @@ determine the state to enable when escaping from the insert state.")
("\\.cmake\\'" . cmake-mode))
auto-mode-alist))))
(defun spacemacs/init-coffee-mode ()
(use-package coffee-mode
:defer t
:init
(progn
(defun spacemacs/coffee-indent ()
(if (coffee-line-wants-indent)
;; We need to insert an additional tab because the last line was special.
(coffee-insert-spaces (+ (coffee-previous-indent) coffee-tab-width))
;; otherwise keep at the same indentation level
(coffee-insert-spaces (coffee-previous-indent)))
)
;; indent to right position after `evil-open-blow' and `evil-open-above'
(add-hook 'coffee-mode-hook '(lambda ()
(setq indent-line-function 'spacemacs/coffee-indent
evil-shift-width coffee-tab-width))))))
(defun spacemacs/init-csharp-mode ()
(use-package csharp-mode
:defer t))
@ -1918,20 +1935,3 @@ determine the state to enable when escaping from the insert state.")
(defun spacemacs/init-zenburn-theme ()
(use-package zenburn-theme
:defer t))
(defun spacemacs/init-coffee-mode ()
(use-package coffee-mode
:defer t
:init
(progn
(defun spacemacs/coffee-indent ()
(if (coffee-line-wants-indent)
;; We need to insert an additional tab because the last line was special.
(coffee-insert-spaces (+ (coffee-previous-indent) coffee-tab-width))
;; otherwise keep at the same indentation level
(coffee-insert-spaces (coffee-previous-indent)))
)
;; indent to right position after `evil-open-blow' and `evil-open-above'
(add-hook 'coffee-mode-hook '(lambda ()
(setq indent-line-function 'spacemacs/coffee-indent
evil-shift-width coffee-tab-width))))))