Preparation of functional benzofurans and indoles via chemoselective intramolecular Wittig reactions.