Thinly dice onions. Place margarine and oil in a heavy saucepan over medium heat. Stir in onions when margarine has melted. Cover pan and cook until onions are soft, about 10 minutes. Add salt and sugar and continue cooking, uncovered and stirring frequently, until onions are dark brown, about 30 minutes. Stir in flour and cook slowly, about another 5 minutes. Add broth and wine and bring to a simmer. Partially cover and simmer slowly 1 1/2 hours, adding water if liquid reduces. Season with pepper to taste. Serve in earthenware crocks, with French bread and grated Swiss cheese.