From 881a2bb3e5bde01ae5273cdb83a89d9cccfa8adb Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 15 Apr 2013 00:11:37 +0200 Subject: Enable flycheck for some more modes Also put all the hook additions in a single place, instead of in each special function. Both the advantages to this method are: - Being able to see in a second where flycheck is enabled. - If all minor modes are added separately it's easy to see exactly which are enabled for a specific mode, just by looking at its hook variable. --- emacs/site-lisp/oni.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'emacs/site-lisp/oni.el') diff --git a/emacs/site-lisp/oni.el b/emacs/site-lisp/oni.el index 2076093..a962741 100644 --- a/emacs/site-lisp/oni.el +++ b/emacs/site-lisp/oni.el @@ -126,8 +126,7 @@ DOT are intentionally being skipped." (defun oni:html-mode-func () "Function for `html-mode-hook'." (yas-minor-mode) - (fci-mode) - (flycheck-mode)) + (fci-mode)) (defun oni:indent-shift-left (start end &optional count) "Rigidly indent region. @@ -224,8 +223,7 @@ If COUNT has been specified indent by that much, otherwise look at "Function for `lua-mode-hook'." (local-unset-key (kbd ")")) (local-unset-key (kbd "]")) - (local-unset-key (kbd "}")) - (flycheck-mode)) + (local-unset-key (kbd "}"))) (defun oni:magit-log-edit-mode-func () "Function for `magit-log-edit-mode-hook'." @@ -340,8 +338,7 @@ When dealing with braces, add another line and indent that too." (c-set-offset 'arglist-intro '+) (c-set-offset 'arglist-close '0) (rainbow-delimiters-mode) - (setq-local fci-rule-column 80) - (flycheck-mode)) + (setq-local fci-rule-column 80)) (defun oni:prog-mode-func () "Function for `prog-mode-hook'." @@ -352,7 +349,6 @@ When dealing with braces, add another line and indent that too." (defun oni:python-mode-func () "Function for `python-mode-hook'." - (flycheck-mode) (local-set-key (kbd "C->") 'python-indent-shift-right) (local-set-key (kbd "C-<") 'python-indent-shift-left) (set (make-local-variable 'electric-indent-chars) nil) -- cgit v1.2.3-54-g00ecf