Heat oven to 230C/fan 210C/gas 8. Smear some butter all over a 23cm cake tin or ovenproof frying pan. Melt the butter in a separate pan. Tip in the onion and cook over a gentle heat for 5 mins until softened.
Meanwhile tip all the dry ingredients into a large mixing bowl. Beat together the buttermilk and eggs in a separate bowl, then stir in the buttery onions. Pour over the dry ingredients and mix together until just combined and you have a batter.
Pour the batter into the cake tin or frying pan and smooth the top with a knife. Bake for 25 mins until golden and a skewer inserted in the centre comes out clean. Cool in the pan for 10 mins, then turn out, cut into wedges and serve. You can make up to 2 days ahead and store in an airtight container, or freeze for up to 1 month.