Skip to content

Instantly share code, notes, and snippets.

@harto
Created October 30, 2010 04:24
Show Gist options
  • Save harto/654944 to your computer and use it in GitHub Desktop.
Save harto/654944 to your computer and use it in GitHub Desktop.
Snippet from .emacs for LESS auto-compilation
(add-to-list 'auto-mode-alist '("\\.less$" . css-mode))
(setq-default compile-less nil)
(add-hook 'css-mode-hook
(lambda ()
(when (string-match "\\.less$" buffer-file-name)
(add-hook 'after-save-hook
(lambda ()
(when compile-less
(funcall compile-less)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment