Function: vc-revert-buffer-internal
vc-revert-buffer-internal is an interactive and byte-compiled function
defined in vc-dispatcher.el.gz.
Signature
(vc-revert-buffer-internal &optional ARG NO-CONFIRM)
Documentation
Revert buffer, keeping point and mark where user expects them.
Try to be clever in the face of changes due to expanded version-control
key words. This is important for typeahead to work as expected.
ARG and NO-CONFIRM are passed on to revert-buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-dispatcher.el.gz
(defun vc-revert-buffer-internal (&optional arg no-confirm)
"Revert buffer, keeping point and mark where user expects them.
Try to be clever in the face of changes due to expanded version-control
key words. This is important for typeahead to work as expected.
ARG and NO-CONFIRM are passed on to `revert-buffer'."
(interactive "P")
(widen)
(let ((context (vc-buffer-context)))
;; Use save-excursion here, because it may be able to restore point
;; and mark properly even in cases where vc-restore-buffer-context
;; would fail. However, save-excursion might also get it wrong --
;; in this case, vc-restore-buffer-context gives it a second try.
(save-excursion
;; t means don't call normal-mode;
;; that's to preserve various minor modes.
(revert-buffer arg no-confirm t))
(vc-restore-buffer-context context)))