diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2007-11-20 08:15:00 +0000 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2007-11-20 08:15:00 +0000 |
commit | 48b4313069f1c3e6d8bc1f5e3e4729833a088d32 (patch) | |
tree | 5680656de2b12b4579810db13c52288fda3fcf72 /lisp | |
parent | 6d00e226c320eab31d8212b048cb67c442cb4c8f (diff) | |
download | emacs-48b4313069f1c3e6d8bc1f5e3e4729833a088d32.tar.gz |
(vc-find-revision): Set the parent buffer.
Use when instead of if.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/vc.el | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2ee6983cb53..84fc597c93d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2007-11-20 Dan Nicolaescu <dann@ics.uci.edu> + * 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 --git a/lisp/vc.el b/lisp/vc.el index f2c0017e8cf..5dc91bf14f8 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -2069,11 +2069,16 @@ If `F.~REV~' already exists, use it instead of checking it out again." (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 |