(xmenu_show): Don't look in menubar for core.height if no menu bar.
[bpt/emacs.git] / lisp / vc.el
index 3439b35..1ad1c9a 100644 (file)
@@ -1,9 +1,10 @@
 ;;; vc.el --- drive a version-control system from within Emacs
 
-;; Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
 
 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
-;; Version: 5.4
+;; Maintainer: eggert@twinsun.com
+;; Version: 5.5
 
 ;; This file is part of GNU Emacs.
 
@@ -30,8 +31,8 @@
 ;; and Richard Stallman contributed valuable criticism, support, and testing.
 ;;
 ;; Supported version-control systems presently include SCCS and RCS;
-;; your RCS version should be 5.6.2 or later for proper operation of
-;; the lock-breaking code.
+;; the RCS lock-stealing code doesn't work right unless you use RCS 5.6.2
+;; or newer.  Currently (January 1994) that is only a beta test release.
 ;;
 ;; The RCS code assumes strict locking.  You can support the RCS -x option
 ;; by adding pairs to the vc-master-templates list.
@@ -605,7 +606,8 @@ permissions zeroed, or deleted (according to the value of `vc-keep-workfiles').
 COMMENT is a comment string; if omitted, a buffer is
 popped up to accept a comment."
   (setq vc-log-after-operation-hook 'vc-checkin-hook)
-  (vc-start-entry file rev comment "Enter a change comment." 'vc-backend-checkin))
+  (vc-start-entry file rev comment
+                 "Enter a change comment." 'vc-backend-checkin))
 
 ;;; Here is a checkin hook that may prove useful to sites using the
 ;;; ChangeLog facility supported by Emacs.
@@ -617,6 +619,9 @@ If nil, uses `change-log-default-name'."
   (interactive (if current-prefix-arg
                   (list current-prefix-arg
                         (prompt-for-change-log-name))))
+  ;; Make sure the defvar for add-log-current-defun-function has been executed
+  ;; before binding it.
+  (require 'add-log)
   (let (;; Extract the comment first so we get any error before doing anything.
        (comment (ring-ref vc-comment-ring 0))
        ;; Don't let add-change-log-entry insert a defun name.
@@ -1035,7 +1040,7 @@ on a buffer attached to the file named in the current Dired buffer line."
 (defun vc-lookup-triple (file name)
   ;; Return the numeric version corresponding to a named snapshot of file
   ;; If name is nil or a version number string it's just passed through
-  (cond ((null name) "")
+  (cond ((null name) name)
        ((let ((firstchar (aref name 0)))
           (and (>= firstchar ?0) (<= firstchar ?9)))
         name)
@@ -1292,11 +1297,12 @@ From a program, any arguments are passed to the `rcs2log' script."
                                   (vc-match-substring 1))))))
                   latest-val))
             (prog1
-                (and (re-search-forward p nil t)
-                     (let ((value (vc-match-substring 1)))
-                       (if file
-                           (vc-file-setprop file (car properties) value))
-                       value))
+                (let ((value nil))
+                  (if (re-search-forward p nil t)
+                      (setq value (vc-match-substring 1)))
+                  (if file
+                      (vc-file-setprop file (car properties) value))
+                  value)
               (setq properties (cdr properties)))))
          patterns)
   )
@@ -1645,7 +1651,7 @@ Return nil if there is no such person."
         (status (apply 'vc-do-command 2 command file options)))
     ;; Some RCS versions don't understand "--brief"; work around this.
     (if (eq status 2)
-       (apply 'vc-do-command 1 command file (if cmp options (cdr options)))
+       (apply 'vc-do-command 1 command file (if cmp (cdr options) options))
       status)))
 
 (defun vc-check-headers ()