]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-find-revision): Set the parent buffer.
authorDan Nicolaescu <dann@ics.uci.edu>
Tue, 20 Nov 2007 08:15:00 +0000 (08:15 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Tue, 20 Nov 2007 08:15:00 +0000 (08:15 +0000)
Use when instead of if.

lisp/ChangeLog
lisp/vc.el

index 2ee6983cb532ec9725c2191d9e0ad4ac8e957c73..84fc597c93d363a8bd8cd55da0e0fdb67308513f 100644 (file)
@@ -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):
index f2c0017e8cf3e0190710e8aa501a2bb3b2121c94..5dc91bf14f85e72c623c095590b6d6f676cc15b1 100644 (file)
@@ -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