From: André Spiegel Date: Thu, 28 Feb 2002 10:00:44 +0000 (+0000) Subject: (vc-revert-buffer): If the buffer is not saved, prompt the user to do X-Git-Tag: ttn-vms-21-2-B4~16436 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d607ebcc094fc322c9462d0d52e99a5f7efb9f9e;p=emacs.git (vc-revert-buffer): If the buffer is not saved, prompt the user to do that first. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f979bcfcc25..8f34d8921c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-02-28 Andre Spiegel + + * vc.el (vc-revert-buffer): If the buffer is not saved, prompt + the user to do that first. + 2002-02-28 Kim F. Storm * simple.el (shell-command-on-region): Report non-zero exit diff --git a/lisp/vc.el b/lisp/vc.el index a6c5b47e7fd..f538a6050d6 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -6,7 +6,7 @@ ;; Maintainer: Andre Spiegel ;; 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)