Heat the olive oil in a large skillet. Add the onions, bay leaves, allspice, marjoram, oregano and pepper and cook over moderately high heat, stirring, until the onions are tender, about 10 minutes. Remove from the heat and stir in the vinegar. Season with salt and let cool. Discard the allspice, marjoram and bay leaves before serving.