Automatically select dictionary for buffer