Something similar could be implemented in vanilla as optional (it's a mod, @Nicolaus_von_Kues). For example, on top of having units switching weapons like now (Immortals at least), doing so with a modifier (CTRL?) could "lock it", activating automatic switching according to range. Doing the same when producing units could then be the shortcut for "Activate Auto-Queue", and in that way it could be done per unit and not in general, like that button works now.