# HG changeset patch # User Dan Nicolaescu # Date 1195546500 0 # Node ID cde7fc4f5945091a5181660115cbf6821df16d3e # Parent fc93e9674475ef646f2669388cec9bab0010e9d9 (vc-find-revision): Set the parent buffer. Use when instead of if. diff -r fc93e9674475 -r cde7fc4f5945 lisp/ChangeLog --- a/lisp/ChangeLog Tue Nov 20 07:56:02 2007 +0000 +++ b/lisp/ChangeLog Tue Nov 20 08:15:00 2007 +0000 @@ -1,5 +1,8 @@ 2007-11-20 Dan Nicolaescu + * vc.el (vc-find-revision): Set the parent buffer. + Use when instead of if. + * progmodes/python.el (info-lookup-maybe-add-help): * progmodes/ps-mode.el (doc-view-minor-mode): * mail/emacsbug.el (Info-menu, Info-goto-node): diff -r fc93e9674475 -r cde7fc4f5945 lisp/vc.el --- a/lisp/vc.el Tue Nov 20 07:56:02 2007 +0000 +++ b/lisp/vc.el Tue Nov 20 08:15:00 2007 +0000 @@ -2069,11 +2069,16 @@ (with-current-buffer filebuf (vc-call find-revision file revision outbuf)))) (setq failed nil)) - (if (and failed (file-exists-p filename)) - (delete-file filename)))) + (when (and failed (file-exists-p filename)) + (delete-file filename)))) (vc-mode-line file)) (message "Checking out %s...done" filename))) - (find-file-noselect filename))) + (let ((result-buf (find-file-noselect filename))) + (with-current-buffer result-buf + ;; Set the parent buffer so that things like + ;; C-x v g, C-x v l, ... etc work. + (setq vc-parent-buffer filebuf)) + result-buf))) ;; Header-insertion code