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))
(global-set-key (kbd "S-; x") 'save-all-and-quit)
This is considering you want to save all buffers without prompting interactively for yes
or no
for all the unsaved buffers.