diff --git a/init-css.el b/init-css.el index b1acaa4164..68f64a7458 100644 --- a/init-css.el +++ b/init-css.el @@ -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) @@ -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)