c/c++: fix irony/flycheck init hook

This commit is contained in:
Henrik Lissner 2016-04-16 00:46:04 -04:00
parent a6fd89aa33
commit 4a7b0fc96c

View file

@ -80,7 +80,9 @@
(define-company-backend! c++-mode (irony))
(define-company-backend! objc-mode (irony))
(add-hook! c-mode-common-hook
;; This is necessary because c-mode dervied modes like php-mode may wrongfully trigger
;; these hooks.
(add-hook! (c-mode c++-mode ojbc-mode)
(when (memq major-mode '(c-mode c++-mode objc-mode))
(flycheck-mode +1)
(irony-mode +1)