diff options
| author | André Spiegel | 1998-03-18 13:25:00 +0000 |
|---|---|---|
| committer | André Spiegel | 1998-03-18 13:25:00 +0000 |
| commit | 01e02ab3875e43f10a0cf286455831b62b6c325e (patch) | |
| tree | 5c99af0f9de299bebd98ea99c27f0c91b47535ee | |
| parent | 93d75e4c43361d62aa57381c7e1358c2bd9ee7ad (diff) | |
| download | emacs-01e02ab3875e43f10a0cf286455831b62b6c325e.tar.gz emacs-01e02ab3875e43f10a0cf286455831b62b6c325e.zip | |
(vc-restore-buffer-context): Only try to restore mark if it is active.
| -rw-r--r-- | lisp/vc.el | 11 |
1 files 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 @@ | |||
| 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> | 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> |
| 6 | ;; Maintainer: Andre Spiegel <spiegel@inf.fu-berlin.de> | 6 | ;; Maintainer: Andre Spiegel <spiegel@inf.fu-berlin.de> |
| 7 | 7 | ||
| 8 | ;; $Id: vc.el,v 1.209 1998/02/27 18:44:14 spiegel Exp spiegel $ | 8 | ;; $Id: vc.el,v 1.210 1998/03/08 10:03:50 spiegel Exp spiegel $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -691,10 +691,11 @@ to an optional list of FLAGS." | |||
| 691 | (if (not (vc-context-matches-p (point) point-context)) | 691 | (if (not (vc-context-matches-p (point) point-context)) |
| 692 | (let ((new-point (vc-find-position-by-context point-context))) | 692 | (let ((new-point (vc-find-position-by-context point-context))) |
| 693 | (if new-point (goto-char new-point)))) | 693 | (if new-point (goto-char new-point)))) |
| 694 | (if mark-context | 694 | (and mark-active |
| 695 | (if (not (vc-context-matches-p (mark) mark-context)) | 695 | mark-context |
| 696 | (let ((new-mark (vc-find-position-by-context mark-context))) | 696 | (not (vc-context-matches-p (mark) mark-context)) |
| 697 | (if new-mark (set-mark new-mark))))))) | 697 | (let ((new-mark (vc-find-position-by-context mark-context))) |
| 698 | (if new-mark (set-mark new-mark)))))) | ||
| 698 | 699 | ||
| 699 | (defun vc-revert-buffer1 (&optional arg no-confirm) | 700 | (defun vc-revert-buffer1 (&optional arg no-confirm) |
| 700 | ;; Revert buffer, try to keep point and mark where user expects them in spite | 701 | ;; Revert buffer, try to keep point and mark where user expects them in spite |