Peel and cut in half 1kg (2lb) red onions; slice each half very thinly into half-circles. Slice 2 plump garlic cloves in the same way. Heat 4 tbsp olive oil in a big, heavy-based pan.
Add the onions, garlic, 2tsp black mustard seeds and 2-3 thyme sprigs. Stir in ½ tsp salt and a generous grating of pepper. Gently cook, uncovered, for 20 minutes, stirring often.
The onions will have reduced, so cook for another 15 minutes, occasionally stirring until they just begin to caramelise. Lower the heat if the onions start to stick.
Stir in 75g (3oz) of light muscovado sugar, 1½ tbsp black treacle, 5 tbsp red wine vinegar, 1 tbsp balsamic vinegar and 75ml (3fl oz) white wine.
Bubble for 20-25 minutes, stirring occasionally, until the mixture is caramelised but still moist. Remove the thyme sprigs and stir in a knob of butter.
While the marmalade is still warm, spoon the mixture into small, clean, sterilised jars (see page 53). It will keep for 1-2 months in a cool place. This recipe makes 600ml (1pt).