Analytical theory of short-pulse free-electron laser oscillators