]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-revert-buffer): If the buffer is not saved, prompt the user to do
authorAndré Spiegel <spiegel@gnu.org>
Thu, 28 Feb 2002 10:00:44 +0000 (10:00 +0000)
committerAndré Spiegel <spiegel@gnu.org>
Thu, 28 Feb 2002 10:00:44 +0000 (10:00 +0000)
that first.

lisp/ChangeLog
lisp/vc.el

index f979bcfcc25e9adb06b35103dd14dfd7ff3827ae..8f34d8921c96f8d095111e23f1fcb64c5939967f 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-28  Andre Spiegel  <spiegel@gnu.org>
+
+       * vc.el (vc-revert-buffer): If the buffer is not saved, prompt
+       the user to do that first.
+
 2002-02-28  Kim F. Storm  <storm@cua.dk>
 
        * simple.el (shell-command-on-region): Report non-zero exit
index a6c5b47e7fd9f6362e8d5f984b81eaffe0b24ddc..f538a6050d694fe9a9d5f602754d22a85f6a1f62 100644 (file)
@@ -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 @@ 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)