changeset 43584:15030afab27a

(vc-revert-buffer): If the buffer is not saved, prompt the user to do that first.
author André Spiegel <spiegel@gnu.org>
date Thu, 28 Feb 2002 09:59:08 +0000
parents 7fda92ad57ad
children 43930eddece3
files lisp/vc.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc.el	Thu Feb 28 04:17:55 2002 +0000
+++ b/lisp/vc.el	Thu Feb 28 09:59:08 2002 +0000
@@ -6,7 +6,7 @@
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 ;; Keywords: tools
 
-;; $Id: vc.el,v 1.326 2002/02/21 21:00:35 spiegel Exp $
+;; $Id: vc.el,v 1.327 2002/02/25 22:00:51 spiegel Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -2538,6 +2538,9 @@
 changes found in the master file; use \\[universal-argument] \\[vc-next-action] to do so."
   (interactive)
   (vc-ensure-vc-buffer)
+  ;; Make sure buffer is saved.  If the user says `no', abort since
+  ;; we cannot show the changes and ask for confirmation to discard them.
+  (vc-buffer-sync nil)
   (let ((file buffer-file-name)
 	;; This operation should always ask for confirmation.
 	(vc-suppress-confirm nil)