(sgml-validate): Ask whether to save only
[bpt/emacs.git] / lisp / textmodes / sgml-mode.el
index c40c8c4..5e7e7d9 100644 (file)
@@ -776,9 +776,7 @@ and move to the line in the SGML document that caused it."
                                    (and name
                                         (file-name-nondirectory name))))))))
   (setq sgml-saved-validate-command command)
-  (if (or (not compilation-ask-about-save)
-         (y-or-n-p (message "Save buffer %s? " (buffer-name))))
-      (save-buffer))
+  (save-some-buffers (not compilation-ask-about-save) nil)
   (compile-internal command "No more errors"))