Melt the butter or heat the oil in a small saucepan over medium heat. Add the onions and sauté, stirring often, for 5 minutes. Remove from heat.
Preheat the oven to 325°F.
Combine the flours, baking powder, dill, and salt and pepper in a large mixing bowl.
Beat the egg in a small mixing bowl and whisk in the milk. Add the onions and melted butter, mixing well. Pour the wet ingredients over the dry ones, mixing gently with a rubber spatula. Mix only enough to make sure all the dry ingredients are moistened.
Oil a 9-by-5-inch loaf pan. Turn the batter into the pan and bake for 50 to 60 minutes, or until the top of the bread is lightly browned and a toothpick inserted into the middle comes out clean. Allow the bread to cool in the pan for 5 minutes, remove, and place on a wire rack to cool a bit longer.