comparison lisp/vc.el @ 32888:78063b725d3f

(vc-version-other-window): Bind `file'.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 25 Oct 2000 21:45:09 +0000
parents e2cb0aef151a
children 3a5e5c74d3bb
comparison
equal deleted inserted replaced
32887:4837f99670c6 32888:78063b725d3f
3 ;; Copyright (C) 1992,93,94,95,96,97,98,2000 Free Software Foundation, Inc. 3 ;; Copyright (C) 1992,93,94,95,96,97,98,2000 Free Software Foundation, Inc.
4 4
5 ;; Author: FSF (see below for full credits) 5 ;; Author: FSF (see below for full credits)
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8 ;; $Id: vc.el,v 1.280 2000/10/10 01:25:40 ttn Exp $ 8 ;; $Id: vc.el,v 1.281 2000/10/22 15:37:51 spiegel Exp $
9 9
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by 13 ;; it under the terms of the GNU General Public License as published by
1568 "Visit version REV of the current buffer in another window. 1568 "Visit version REV of the current buffer in another window.
1569 If the current buffer is named `F', the version is named `F.~REV~'. 1569 If the current buffer is named `F', the version is named `F.~REV~'.
1570 If `F.~REV~' already exists, it is used instead of being re-created." 1570 If `F.~REV~' already exists, it is used instead of being re-created."
1571 (interactive "sVersion to visit (default is workfile version): ") 1571 (interactive "sVersion to visit (default is workfile version): ")
1572 (vc-ensure-vc-buffer) 1572 (vc-ensure-vc-buffer)
1573 (let* ((version (if (string-equal rev "") 1573 (let* ((file buffer-file-name)
1574 (vc-workfile-version buffer-file-name) 1574 (version (if (string-equal rev "")
1575 (vc-workfile-version file)
1575 rev)) 1576 rev))
1576 (automatic-backup (vc-version-backup-file-name file version)) 1577 (automatic-backup (vc-version-backup-file-name file version))
1577 (manual-backup (vc-version-backup-file-name file version 'manual))) 1578 (manual-backup (vc-version-backup-file-name file version 'manual)))
1578 (unless (file-exists-p manual-backup) 1579 (unless (file-exists-p manual-backup)
1579 (if (file-exists-p automatic-backup) 1580 (if (file-exists-p automatic-backup)
1580 (copy-file automatic-backup manual-backup nil 'keep-date) 1581 (copy-file automatic-backup manual-backup nil 'keep-date)
1581 (vc-call checkout buffer-file-name nil version manual-backup))) 1582 (vc-call checkout file nil version manual-backup)))
1582 (find-file-other-window manual-backup))) 1583 (find-file-other-window manual-backup)))
1583 1584
1584 ;; Header-insertion code 1585 ;; Header-insertion code
1585 1586
1586 ;;;###autoload 1587 ;;;###autoload