Function: vc-restore-buffer-context
vc-restore-buffer-context is a byte-compiled function defined in
vc-dispatcher.el.gz.
Signature
(vc-restore-buffer-context CONTEXT)
Documentation
Restore point/mark, and reparse any affected compilation buffers.
CONTEXT is that which vc-buffer-context returns.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-dispatcher.el.gz
(defun vc-restore-buffer-context (context)
"Restore point/mark, and reparse any affected compilation buffers.
CONTEXT is that which `vc-buffer-context' returns."
(let ((point-context (nth 0 context))
(mark-context (nth 1 context)))
;; if necessary, restore point and mark
(if (not (vc-context-matches-p (point) point-context))
(let ((new-point (vc-find-position-by-context point-context)))
(when new-point (goto-char new-point))))
(and mark-active
mark-context
(not (vc-context-matches-p (mark) mark-context))
(let ((new-mark (vc-find-position-by-context mark-context)))
(when new-mark (set-mark new-mark))))))