Skip to content
Browse files

adding coffee script mode

  • Loading branch information...
1 parent ebb5c81 commit 0995827111c20e8cbb348b74f98e9dd267ff5f33 @dougalcorn committed
Showing with 14 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +10 −0 coffeescript-config.el
  3. +1 −0 init.el
View
3 .gitmodules
@@ -10,3 +10,6 @@
[submodule "site-lisp/emacs-ruby-electric"]
path = site-lisp/emacs-ruby-electric
url = git@github.com:dougalcorn/emacs-ruby-electric.git
+[submodule "coffee-mode"]
+ path = coffee-mode
+ url = git://github.com/defunkt/coffee-mode.git
View
10 coffeescript-config.el
@@ -0,0 +1,10 @@
+(require 'coffee-mode)
+(add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode))
+(add-to-list 'auto-mode-alist '("Cakefile" . coffee-mode))
+
+(defun coffee-custom ()
+ "coffee-mode-hook"
+ (set (make-local-variable 'tab-width) 2))
+
+(add-hook 'coffee-mode-hook
+ '(lambda() (coffee-custom)))
View
1 init.el
@@ -56,6 +56,7 @@
(load-file (concat my-config-dir "ruby-conf.el"))
;(load-file (concat my-config-dir "display-time-config.el"))
;(load-file (concat my-config-dir "elscreen-config.el"))
+(load-file (concat my-config-dir "coffeescript-config.el"))
(add-hook 'eshell-mode-hook '(lambda () (load-file (concat my-config-dir "eshell-funcs.el"))))
(load-file (concat my-config-dir "readpassword-remap.el"))
(load-file (concat my-config-dir "keys.el"))

0 comments on commit 0995827

Please sign in to comment.
Something went wrong with that request. Please try again.