Melt butter in sauté pan over medium-low heat; add onions and cook, stirring occasionally, until onions are soft and golden colored (about 20 minutes). Let cool.
In a large mixing bowl, combine yeast, sugar, ½ cup of flour and warm water; let mixture stand until foamy (about 20-25 minutes.)
To the yeast mixture, add half of the remaining flour along with rosemary and salt; mix well with a heavy-duty mixer or wooden spoon.
Gradually add the rest of the flour and the onion/butter mixture to form stiff, slightly sticky dough.
Knead with a dough hook of an electric mixer for 10 minutes or transfer to a lightly floured surface and knead by hand until smooth and satiny, about 15 minutes.
Shape dough into a slightly flattened ball and place on a buttered baking sheet. Cover and let rise in a warm place until doubled (45-60 minutes.)
Bake 400°F for 30 minutes or until browned.
For a tender crust, lightly brush warm loaf with butter.