Created
October 30, 2010 04:24
-
-
Save harto/654944 to your computer and use it in GitHub Desktop.
Snippet from .emacs for LESS auto-compilation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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