Is it possible to hook flymake-mode to the php-mode-hook?

Asked by nurikabe

Adding the usual

    (add-hook 'php-mode-hook (lambda () (flymake-mode t)))

to my .emacs works, but breaks mumamo highlighting. (mumamo says it can't find the file, so I suppose it's trying to process the temporary flymake php file?)

Is there a way to turn on flymake by default via nXhhtml?

Question information

Language:
English Edit question
Status:
Solved
For:
nXhtml Edit question
Assignee:
No assignee Edit question
Solved by:
lborgman
Solved:
Last query:
Last reply:
Revision history for this message
Best lborgman (lennart-borgman) said :
#1

Hi nurikabe,

Flymake is dependent on the file and does not care about the major mode. It sends the whole file to the php program in this case.

So the major mode hook is not a good place to start flymake. It is better to use find-file-hook.

Revision history for this message
nurikabe (nurikabe) said :
#2

Thanks lborgman, that solved my question.