Mercurial > emacs
comparison lisp/vc.el @ 86248:cde7fc4f5945
(vc-find-revision): Set the parent buffer.
Use when instead of if.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Tue, 20 Nov 2007 08:15:00 +0000 |
parents | ac69f23a84ce |
children | 36ff364fc708 |
comparison
equal
deleted
inserted
replaced
86247:fc93e9674475 | 86248:cde7fc4f5945 |
---|---|
2067 ;; Change buffer to get local value of | 2067 ;; Change buffer to get local value of |
2068 ;; vc-checkout-switches. | 2068 ;; vc-checkout-switches. |
2069 (with-current-buffer filebuf | 2069 (with-current-buffer filebuf |
2070 (vc-call find-revision file revision outbuf)))) | 2070 (vc-call find-revision file revision outbuf)))) |
2071 (setq failed nil)) | 2071 (setq failed nil)) |
2072 (if (and failed (file-exists-p filename)) | 2072 (when (and failed (file-exists-p filename)) |
2073 (delete-file filename)))) | 2073 (delete-file filename)))) |
2074 (vc-mode-line file)) | 2074 (vc-mode-line file)) |
2075 (message "Checking out %s...done" filename))) | 2075 (message "Checking out %s...done" filename))) |
2076 (find-file-noselect filename))) | 2076 (let ((result-buf (find-file-noselect filename))) |
2077 (with-current-buffer result-buf | |
2078 ;; Set the parent buffer so that things like | |
2079 ;; C-x v g, C-x v l, ... etc work. | |
2080 (setq vc-parent-buffer filebuf)) | |
2081 result-buf))) | |
2077 | 2082 |
2078 ;; Header-insertion code | 2083 ;; Header-insertion code |
2079 | 2084 |
2080 ;;;###autoload | 2085 ;;;###autoload |
2081 (defun vc-insert-headers () | 2086 (defun vc-insert-headers () |