@findex vc-revert
@vindex vc-revert-show-diff
If you want to discard all the changes you have made to the current
-VC fileset, type @kbd{C-x v u} (@code{vc-revert}). This shows
-you a diff between the work file(s) and the revision from which you
-started editing, and asks for confirmation for discarding the changes.
-If you agree, the fileset is reverted. If you don't want @kbd{C-x v
-u} to show a diff, set the variable @code{vc-revert-show-diff} to
-@code{nil} (you can still view the diff directly with @kbd{C-x v =};
-@pxref{Old Revisions}).
+VC fileset, type @kbd{C-x v u} (@code{vc-revert}). This will ask you
+for confirmation before discarding the changes. If you agree, the
+fileset is reverted.
+
+ If @code{vc-revert-show-diff} is non-@code{nil}, this command will
+show you a diff between the work file(s) and the revision from which
+you started editing. Afterwards, the diff buffer will either be
+killed (if this variable is @code{kill}), or the buffer will be buried
+(any other non-@code{nil} value). If you don't want @kbd{C-x v u} to
+show a diff, set this variable to @code{nil} (you can still view the
+diff directly with @kbd{C-x v =}; @pxref{Old Revisions}).
On locking-based version control systems, @kbd{C-x v u} leaves files
unlocked; you must lock again to resume editing. You can also use
** Change Logs and VC
++++
+*** 'vc-revert-show-diff' now has a third possible value: 'kill'.
+If this variable is 'kill', then the diff buffer will be killed after
+the 'vc-revert' action instead of buried.
+
*** More VC commands can be used from non-file buffers.
The relevant commands are those that don't change the VC state.
The non-file buffers which can use VC commands are those that have
(defcustom vc-revert-show-diff t
"If non-nil, `vc-revert' shows a `vc-diff' buffer before querying."
- :type 'boolean
+ :type '(choice (const :tag "Show and bury afterwards" t)
+ (const :tag "Show and kill afterwards" kill)
+ (const :tag "Don't show" nil))
:version "24.1")
;; Header-insertion hair
(if (= nfiles 1) "" "s"))))))
(error "Revert canceled")))
(when diff-buffer
- (quit-windows-on diff-buffer)))
+ (quit-windows-on diff-buffer (eq vc-revert-show-diff 'kill))))
(dolist (file files)
(message "Reverting %s..." (vc-delistify files))
(vc-revert-file file)