I am writing a minor mode for php/html files. I use a function (cf. font-lock-keywords
) to fontify <?php
?>
blocs.
In order to fontify multilined blocs, I need to set font-lock-multiline
to t.
Everything is running quite nicely. Their is just a problem in this case :
When I have a multiline bloc and a delete the closing tag (?>
) the bloc is unfontified. When I put the tag back, the block is not fontified again.
I have three questions :
1/ is there a simple solution to this problem
if not
2/ is there any way to trigger font-lock-fontify-buffer
each time I type those two chars :
'?''>'
3/ better, is there a way to trigger this kind a fonction : when I type ?>
I find the opening tag <?php
and force a font-lock-fontify-region
on this bloc.