Skip to content

Commit

Permalink
More realistic before-save-hook example
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Mar 25, 2010
1 parent b7e600d commit 705b468
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Expand Up @@ -211,8 +211,11 @@ Naturally. Example:
;; Riding edge.
(setq coffee-command "~/dev/coffee"))

;; Compile JS on every save.
(add-hook 'before-save-hook 'coffee-compile-file)
;; Compile JS on every save, unless it's a Cakefile.
(add-hook 'before-save-hook
'(lambda ()
(when (not (string= (buffer-name) "Cakefile"))
(coffee-compile-file))))

(add-hook 'coffee-mode-hook '(lambda () (coffee-custom)))

Expand Down

0 comments on commit 705b468

Please sign in to comment.