summaryrefslogtreecommitdiff
path: root/lisp/vc/vc.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-09-04 11:14:12 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-09-04 11:14:12 +0200
commita8de88e3300464eb382a65ea96da69f23d21ead2 (patch)
tree45aa8243a4ba09995c4a5fb4453e18bdb5e81fbd /lisp/vc/vc.el
parent56c98a4ad886376b3c73d6c8b9a96f6bca8f0f48 (diff)
downloademacs-a8de88e3300464eb382a65ea96da69f23d21ead2.tar.gz
emacs-a8de88e3300464eb382a65ea96da69f23d21ead2.tar.bz2
emacs-a8de88e3300464eb382a65ea96da69f23d21ead2.zip
Allow killing the diff buffer after `C-x v u'
* doc/emacs/maintaining.texi (VC Undo): Document this. * lisp/vc/vc.el (vc-revert-show-diff): Allow a `kill' value. (vc-revert): Use it (bug#16902).
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r--lisp/vc/vc.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 8036be390a9..f6ae27075f3 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -860,7 +860,9 @@ See `run-hooks'."
(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
@@ -2757,7 +2759,7 @@ to the working revision (except for keyword expansion)."
(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)