Self-mode-locking of continuous solid-state lasers with an extra cavity