The effect of dispersion on the lasing of waveguide free-electron lasers driven by short periodic electron bunches is considered. In the high-Q cavity approximation, the generation of electromagnetic pulses is described in terms of a parabolic equation. For the linear stage of interaction, starting lasing conditions are found analytically and the spatio-temporal structure of supermodes, which represent a set of phase-locked eigenmodes of the cold cavity, is determined. Dispersion is shown to allow the free-electron laser to operate at both positive and negative mismatches between the period of electron bunch injection and the time taken for the electromagnetic pulse to circulate over the cavity. The simulation of the nonlinear lasing conditions with allowance for dispersion spread makes it possible to find the stationary profile of radiated pulses and the optimum values of the group and time detunings that provide a maximum efficiency of the waveguide free-electron laser. It is also shown that, when the length of interaction is much longer than the starting value, the laser operates under the conditions of periodic or chaotic pulse profile self-modulation.