From 01e02ab3875e43f10a0cf286455831b62b6c325e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Spiegel?= Date: Wed, 18 Mar 1998 13:25:00 +0000 Subject: [PATCH] (vc-restore-buffer-context): Only try to restore mark if it is active. --- lisp/vc.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/vc.el b/lisp/vc.el index 328c69b3270..ea2978b9a1a 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -5,7 +5,7 @@ ;; Author: Eric S. Raymond ;; Maintainer: Andre Spiegel -;; $Id: vc.el,v 1.209 1998/02/27 18:44:14 spiegel Exp spiegel $ +;; $Id: vc.el,v 1.210 1998/03/08 10:03:50 spiegel Exp spiegel $ ;; This file is part of GNU Emacs. @@ -691,10 +691,11 @@ to an optional list of FLAGS." (if (not (vc-context-matches-p (point) point-context)) (let ((new-point (vc-find-position-by-context point-context))) (if new-point (goto-char new-point)))) - (if mark-context - (if (not (vc-context-matches-p (mark) mark-context)) - (let ((new-mark (vc-find-position-by-context mark-context))) - (if new-mark (set-mark new-mark))))))) + (and mark-active + mark-context + (not (vc-context-matches-p (mark) mark-context)) + (let ((new-mark (vc-find-position-by-context mark-context))) + (if new-mark (set-mark new-mark)))))) (defun vc-revert-buffer1 (&optional arg no-confirm) ;; Revert buffer, try to keep point and mark where user expects them in spite -- 2.39.5