  Common-envelope evolution is a stage in binary system evolution in which a
giant star engulfs a companion. The standard energy formalism is an analytical
framework to estimate the amount of energy transferred from the companion's
shrinking orbit into the envelope of the star that engulfed it. We show
analytically that this energy transfer is larger than predicted by the standard
formalism. As the orbit of the companion shrinks, the mass it encloses becomes
smaller, and the companion is less bound than if the enclosed mass had remained
constant. Therefore, more energy must be transferred to the envelope for the
orbit to shrink further. We derive a revised energy formalism that accounts for
this effect, and discuss its consequences in two contexts: the formation of
neutron star binaries, and the engulfment of planets and brown dwarfs by their
host stars. The companion mass required to eject the stellar envelope is
smaller by up to $50\%$, leading to differences in common-envelope evolution
outcomes. The energy deposition in the outer envelope of the star, which is
related to the transient luminosity and duration, is up to a factor of
$\approx7$ higher. Common-envelope efficiency values above unity, as defined in
the literature, are thus not necessarily unphysical, and result at least partly
from an incomplete description of the energy deposition. The revised energy
formalism presented here can improve our understanding of stellar merger and
common-envelope observations and simulations.
