Skip to main content
2 of 2
removed a line that wasn't working

This should do the trick. Just add this to your .emacs and bind it to a key and you're done

(defun save-all-and-quit ()
  (interactive)
  (save-some-buffers t)
  (kill-emacs))

This is considering you want to save all buffers without prompting interactively for yes or no for all the unsaved buffers.