A semiclassical, nonlinear theory of a single-mode laser is developed so that the transition around threshold can be studied. The field is expressed in the frequency domain which allows us to emphasize the role of the Fabry-P\'erot cavity. A generalized Airy function is obtained for the laser line shape: it contains the source line shape and the empty cavity line shape. It describes the laser both above and below threshold, including the transition region where there is an abrupt increase of intensity and decrease of the laser linewidth. The general arguments are illustrated by detailed numerical calculations for the 3.39-\ensuremath{\mu}m line of the He-Ne laser. The intensity of the spontaneous emission source which plays a central role is computed from first principles.
The definition of an effective polarizability associated with a dipole transition is shown to result from the use of a dyadic Green's function in solving the electron equation of motion obtained from a classical model of spontaneous emission that takes into account the presence of nonhomogeneities in the electric permittivity. This polarizability provides access to the line shape associated with the transition; it also provides a generalized procedure for studying the effects of changes in the electromagnetic environment on line shapes, frequency shifts, and transition rates.