diff options
| author | André Spiegel | 2001-11-26 16:07:50 +0000 |
|---|---|---|
| committer | André Spiegel | 2001-11-26 16:07:50 +0000 |
| commit | ac0aae44d989a215edc02245cd302c6fe3d4592f (patch) | |
| tree | 291766e86f59bc495eda7287173ca17da075082b | |
| parent | 8868cc34208549f5dbcfc932da173ad24642c23b (diff) | |
| download | emacs-ac0aae44d989a215edc02245cd302c6fe3d4592f.tar.gz emacs-ac0aae44d989a215edc02245cd302c6fe3d4592f.zip | |
(vc-find-version): New function.
(vc-version-other-window): Redefined in terms of the above.
| -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 @@ | |||
| 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| 7 | ;; Keywords: tools | 7 | ;; Keywords: tools |
| 8 | 8 | ||
| 9 | ;; $Id: vc.el,v 1.320 2001/11/15 10:31:17 spiegel Exp $ | 9 | ;; $Id: vc.el,v 1.321 2001/11/23 10:11:29 spiegel Exp $ |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | 12 | ||
| @@ -1908,14 +1908,18 @@ If `F.~REV~' already exists, use it instead of checking it out again." | |||
| 1908 | (let* ((file buffer-file-name) | 1908 | (let* ((file buffer-file-name) |
| 1909 | (version (if (string-equal rev "") | 1909 | (version (if (string-equal rev "") |
| 1910 | (vc-workfile-version file) | 1910 | (vc-workfile-version file) |
| 1911 | rev)) | 1911 | rev))) |
| 1912 | (automatic-backup (vc-version-backup-file-name file version)) | 1912 | (switch-to-buffer-other-window (vc-find-version file version)))) |
| 1913 | (manual-backup (vc-version-backup-file-name file version 'manual))) | 1913 | |
| 1914 | (defun vc-find-version (file version) | ||
| 1915 | "Read VERSION of FILE into a buffer and return the buffer." | ||
| 1916 | (let ((automatic-backup (vc-version-backup-file-name file version)) | ||
| 1917 | (manual-backup (vc-version-backup-file-name file version 'manual))) | ||
| 1914 | (unless (file-exists-p manual-backup) | 1918 | (unless (file-exists-p manual-backup) |
| 1915 | (if (file-exists-p automatic-backup) | 1919 | (if (file-exists-p automatic-backup) |
| 1916 | (rename-file automatic-backup manual-backup nil) | 1920 | (rename-file automatic-backup manual-backup nil) |
| 1917 | (vc-call checkout file nil version manual-backup))) | 1921 | (vc-call checkout file nil version manual-backup))) |
| 1918 | (find-file-other-window manual-backup))) | 1922 | (find-file-noselect manual-backup))) |
| 1919 | 1923 | ||
| 1920 | ;; Header-insertion code | 1924 | ;; Header-insertion code |
| 1921 | 1925 | ||