diff options
author | André Spiegel <spiegel@gnu.org> | 2001-11-26 16:07:50 +0000 |
---|---|---|
committer | André Spiegel <spiegel@gnu.org> | 2001-11-26 16:07:50 +0000 |
commit | ac0aae44d989a215edc02245cd302c6fe3d4592f (patch) | |
tree | 291766e86f59bc495eda7287173ca17da075082b /lisp | |
parent | 8868cc34208549f5dbcfc932da173ad24642c23b (diff) | |
download | emacs-ac0aae44d989a215edc02245cd302c6fe3d4592f.tar.gz |
(vc-find-version): New function.
(vc-version-other-window): Redefined in terms of the above.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/vc.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index b9212326b87..2db97de8041 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -6,7 +6,7 @@ ;; Maintainer: Andre Spiegel <spiegel@gnu.org> ;; Keywords: tools -;; $Id: vc.el,v 1.320 2001/11/15 10:31:17 spiegel Exp $ +;; $Id: vc.el,v 1.321 2001/11/23 10:11:29 spiegel Exp $ ;; This file is part of GNU Emacs. @@ -1908,14 +1908,18 @@ If `F.~REV~' already exists, use it instead of checking it out again." (let* ((file buffer-file-name) (version (if (string-equal rev "") (vc-workfile-version file) - rev)) - (automatic-backup (vc-version-backup-file-name file version)) - (manual-backup (vc-version-backup-file-name file version 'manual))) + rev))) + (switch-to-buffer-other-window (vc-find-version file version)))) + +(defun vc-find-version (file version) + "Read VERSION of FILE into a buffer and return the buffer." + (let ((automatic-backup (vc-version-backup-file-name file version)) + (manual-backup (vc-version-backup-file-name file version 'manual))) (unless (file-exists-p manual-backup) (if (file-exists-p automatic-backup) (rename-file automatic-backup manual-backup nil) (vc-call checkout file nil version manual-backup))) - (find-file-other-window manual-backup))) + (find-file-noselect manual-backup))) ;; Header-insertion code |