]> code.delx.au - gnu-emacs/blobdiff - lisp/vc.el
(mh-version): Use mh-e-RCS-id rather than mh-e-version
[gnu-emacs] / lisp / vc.el
index b4c6f9e19e893845238b9fd24e85984a5667e27e..190cdc254be2792d548cf336d0a8c0321c9f5059 100644 (file)
@@ -1,6 +1,6 @@
 ;;; vc.el --- drive a version-control system from within Emacs
 
-;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 
 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
 ;; Modified by:
@@ -190,7 +190,7 @@ If nil, VC itself computes this value when it is first needed.")
 (defvar vc-dired-mode nil)
 (make-variable-buffer-local 'vc-dired-mode)
 
-(defvar vc-comment-ring nil)
+(defvar vc-comment-ring (make-ring vc-maximum-comment-ring-size))
 (defvar vc-comment-ring-index nil)
 (defvar vc-last-comment-match nil)
 
@@ -297,7 +297,7 @@ If nil, VC itself computes this value when it is first needed.")
   (fillarray vc-file-prop-obarray nil)
   ;; Note: there is potential for minor lossage here if there is an open
   ;; log buffer with a nonzero local value of vc-comment-ring-index.
-  (setq vc-comment-ring nil))
+  (setq vc-comment-ring (make-ring vc-maximum-comment-ring-size)))
 
 (defun vc-file-clear-masterprops (file)
   ;; clear all properties of FILE that were retrieved
@@ -1006,8 +1006,6 @@ If nil, uses `change-log-default-name'."
        ;; Comment too long?
        (vc-backend-logentry-check vc-log-file)
        ;; Record the comment in the comment ring
-       (if (null vc-comment-ring)
-           (setq vc-comment-ring (make-ring vc-maximum-comment-ring-size)))
        (ring-insert vc-comment-ring (buffer-string))
        ))
   ;; Sync parent buffer in case the user modified it while editing the comment.
@@ -1729,7 +1727,10 @@ A prefix argument means do not revert the buffer afterwards."
     (if oldbuf
        (save-excursion
          (set-buffer oldbuf)
-         (set-visited-file-name new)
+         (let ((buffer-read-only buffer-read-only))
+           (set-visited-file-name new))
+         (vc-backend new)
+         (vc-mode-line new)
          (set-buffer-modified-p nil))))
   ;; This had FILE, I changed it to OLD. -- rms.
   (vc-backend-dispatch old
@@ -1770,12 +1771,10 @@ From a program, any arguments are passed to the `rcs2log' script."
                              f)))
                         (directory-files RCS nil "...\\|^[^.]\\|^.[^.]")))))))
   (let ((odefault default-directory)
-       (full-name (if (boundp 'add-log-full-name)
-                      add-log-full-name
-                    (user-full-name)))
-       (mailing-address (if (boundp 'add-log-mailing-address)
-                            add-log-mailing-address
-                          user-mail-address)))
+       (full-name (or add-log-full-name
+                      (user-full-name)))
+       (mailing-address (or add-log-mailing-address
+                            user-mail-address)))
     (find-file-other-window (find-change-log))
     (barf-if-buffer-read-only)
     (vc-buffer-sync)