I created a hook function to activate irony-mode when working with c files. However, when I open a php file, these hook is also executed.
Here is the code:
(defun my-company-irony ()
(irony-mode)
(unless (memq 'company-irony company-backends)
(setq-local company-backends (cons 'company-irony company-backends))))
(add-hook 'c-mode-hook #'my-company-irony)
Does anybody knows how to stop executing this hook on php files?