From: André Spiegel Date: Tue, 5 Mar 2002 13:41:05 +0000 (+0000) Subject: (vc-revert-buffer): If the buffer is not saved, prompt the user to do X-Git-Tag: emacs-21.2~37 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4c8749ce473d96f10d8aedfe24becb74b539bd9e;p=emacs.git (vc-revert-buffer): If the buffer is not saved, prompt the user to do that first. --- 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 ;; 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)