Heat in a soup pot over medium heat until the butter is melted:
Add and stir to coat:
Cook, stirring occasionally and keeping an eye on the onions so they do not scorch. As soon as they start to brown, about 30 minutes, reduce the heat to medium-low and continue to cook, stirring frequently, until they are a rich brown, about 1 hour. Stir in:
Increase the heat to high and cook, stirring constantly, until the sherry has evaporated. Stir in:
Bring to a boil, then reduce the heat, partially cover, and simmer for 20 minutes. Season with:
Place 4 broilerproof soup bowls or crocks on a baking sheet. Ladle the hot soup into the bowls and top each with:
Sprinkle each bowl with:
Broil until the cheese is melted and browned.