summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>2002-03-05 13:41:05 +0000
committerAndré Spiegel <spiegel@gnu.org>2002-03-05 13:41:05 +0000
commit4c8749ce473d96f10d8aedfe24becb74b539bd9e (patch)
treea8290fb691622047a0de66801bfb150d44110598
parent90a518cd741d8cdb20d5d38f8b7a5882054d6475 (diff)
downloademacs-4c8749ce473d96f10d8aedfe24becb74b539bd9e.tar.gz
(vc-revert-buffer): If the buffer is not saved, prompt the user to do
that first.
-rw-r--r--lisp/vc.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index a32bd5d9bd3..403e62c9fc8 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -6,7 +6,7 @@
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
;; Keywords: tools
-;; $Id: vc.el,v 1.311.4.3 2001/11/14 13:50:58 spiegel Exp $
+;; $Id: vc.el,v 1.311.4.4 2001/11/15 10:56:37 spiegel Exp $
;; This file is part of GNU Emacs.
@@ -2483,6 +2483,9 @@ to that version. This function does not automatically pick up newer
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)