Skip to content

Commit

Permalink
Tidy up various CSS mode hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Jan 11, 2012
1 parent 0e9af1f commit 577b995
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions init-css.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

;; Colourise CSS colour literals
(autoload 'rainbow-turn-on "rainbow-mode" "Enable rainbow mode colour literal overlays")
(add-hook 'css-mode-hook 'rainbow-turn-on)
(add-hook 'html-mode-hook 'rainbow-turn-on)
(add-hook 'sass-mode-hook 'rainbow-turn-on)
(dolist (hook '(css-mode-hook html-mode-hook sass-mode-hook))
(add-hook hook 'rainbow-turn-on))


(defun maybe-flymake-css-load ()
"Activate flymake-css as necessary, but not in derived modes."
(when (eq major-mode 'css-mode)
(flymake-css-load)))
(add-hook 'css-mode-hook 'maybe-flymake-css-load)
Expand All @@ -42,7 +42,7 @@

(eval-after-load "auto-complete"
'(progn
(add-hook 'css-mode-hook 'ac-css-mode-setup)
(add-hook 'sass-mode-hook 'ac-css-mode-setup)))
(dolist (hook '(css-mode-hook sass-mode-hook))
(add-hook hook 'ac-css-mode-setup))))

(provide 'init-css)

0 comments on commit 577b995

Please sign in to comment.