Friedel-Crafts reaction of anisole? We know that phenol and aniline, despite being strongly activating, are unable to to undergo Friedel-Crafts reactions because they form complexes with $\ce{AlCl3}$, thanks to the lone pair on nitrogen and oxygen atoms.

However, according to my notes (and Google) anisole does undergo Friedel-Crafts reactions. How can it be possible, why is there no complex formation this time? 

Also, I wanted to know how can we say that a certain group like $\ce{OH}$ will surely form a complex? Is containing a lone pair a sufficient condition?
Friedel-Crafts acylation of anisole with acetyl chloride and aluminium chloride as catalyst is a standard laboratory procedure to synthesize acetanisole.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

The fact that this reaction is possible does not imply that there is no complex formation with $\ce{AlCl3}$. On the contrary, it is quite probable that such complexes do form due to the interaction of the methoxy oxygen with $\ce{AlCl3}$.

Therefore, and to compensate the formation of complexes with the resulting ketone, $\ce{AlCl3}$ is added in more than two-fold excess in the above synthesis.