Implement AUCTeX-like dispatcher