VC's state is wiped out when the workfile's buffer has it's mode
authorChris Hanson <org/chris-hanson/cph>
Thu, 7 Jun 2001 17:48:19 +0000 (17:48 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 7 Jun 2001 17:48:19 +0000 (17:48 +0000)
changed.  Use new event EVENT:SET-BUFFER-MAJOR-MODE to reset it at
that time.

v7/src/edwin/vc.scm

index 4170227ad50d78ea9c2e6e0d93b49d9d93f39e1b..09f9efcfa3aa45da9fd400333cd9148df7a67f1b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: vc.scm,v 1.78 2001/06/07 17:44:21 cph Exp $
+;;; $Id: vc.scm,v 1.79 2001/06/07 17:48:19 cph Exp $
 ;;;
 ;;; Copyright (c) 1994-2001 Massachusetts Institute of Technology
 ;;;
@@ -373,7 +373,9 @@ Otherwise, the mod time of the file is the checkout time."
          (begin
            (buffer-remove! buffer 'VC-MASTER)
            (if (vc-dired-buffer? buffer)
-               (file-vc-master (dired-this-file buffer error?) error?)
+               (let ((workfile (dired-this-file buffer error?)))
+                 (and workfile
+                      (file-vc-master workfile error?)))
                (let ((workfile (buffer-pathname buffer)))
                  (if workfile
                      (let ((master (%file-vc-master workfile error?)))