in a heavy saucepan cook onion in butter over moderate heat, stirring, until golden, about 5 minutes. stir in wine and boil until mixture is reduced to about 1 cup, about 15 minutes. stir in stock or demiglace and boil until mixture is reduced to about 2 cups, about 10 minutes. remove pan from heat and stir in caramel.