Nightmares, far from being unsuccessful dreams or exceptions to rules about dreams, can be considered paradigms for all dreaming. They allow us to follow exactly how a disturbance or perturbation is handled by the processing systems in our minds. The data considered here consists of dream series in the weeks and months immediately following trauma in adults--in other words, nightmares and dreams occurring as the trauma resolves. It appears the traumatized person may dream first about the actual trauma (though not always), then, very quickly, the dreams appear to deal with the dominant emotion. Dreams of being overwhelmed by a tidal wave or being swept up by a whirlwind are common after almost any trauma. Clearly, such dreams are not about the sensory input from the actual trauma. Rather, the dreams are about the dominant emotion. The dreams contextualize (find a picture context for) the emotional concern. After trauma, the dominant emotion is usually first terror and fear, then often followed by guilt (such as survivor guilt). This too is pictured in the dream series. The same pattern of contextualizing an emotional concern can be seen in stressful situations, in pregnancy, or in patients whose lives are dominated by one emotion. This pattern is paradigmatic for all dreams, but it may be difficult to detect in "ordinary" dreams, because there may be a number of other relatively smaller emotional concerns present, as opposed to the one clear-cut dominant one (as after trauma). A theory of dreaming is sketched out based on these data which suggests that overall dreaming makes connections more broadly than waking in the nets of the mind, and that the connections are not made randomly but guided by the dreamer's emotional concerns. It is also suggested that the making of connections may be functional for the organism in the sense of "weaving in," or integrating, new material.