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?