Commit 9c95ac44 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

entered into RCS

parent 5516387c
......@@ -693,11 +693,14 @@ levels in the snapshot."
;;;###autoload
(defun vc-revert-buffer ()
"Revert the current buffer's file back to the latest version."
"Revert the current buffer's file back to the latest checked-in version.
This asks for confirmation if the buffer contents are not identical
to that version."
(interactive)
(let ((file buffer-file-name)
(obuf (current-buffer)) (changed (vc-diff nil)))
(if (and changed (or vc-suppress-confirm (not (y-or-n-p "Discard changes? "))))
(if (and changed (or vc-suppress-confirm
(not (yes-or-no-p "Discard changes? "))))
(progn
(delete-window)
(error "Revert cancelled."))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment