From 4c8749ce473d96f10d8aedfe24becb74b539bd9e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Spiegel?= Date: Tue, 5 Mar 2002 13:41:05 +0000 Subject: [PATCH] (vc-revert-buffer): If the buffer is not saved, prompt the user to do that first. --- lisp/vc.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.39.2