* man/makefile.w32-in (mostlyclean, clean, maintainer-clean): Use
[bpt/emacs.git] / lisp / vc.el
index faf35f5..3c04dd9 100644 (file)
@@ -1,13 +1,13 @@
 ;;; vc.el --- drive a version-control system from within Emacs
 
-;; Copyright (C) 1992,93,94,95,96,97,98,2000,01,2003
+;; Copyright (C) 1992,93,94,95,96,97,98,2000,01,2003,2004
 ;;           Free Software Foundation, Inc.
 
 ;; Author:     FSF (see below for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 ;; Keywords: tools
 
-;; $Id: vc.el,v 1.363 2004/01/21 11:05:51 uid65624 Exp $
+;; $Id: vc.el,v 1.366 2004/02/07 00:37:13 uid65598 Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -804,11 +804,11 @@ somebody else, signal error."
   (let ((filevar (make-symbol "file")))
     `(let ((,filevar (expand-file-name ,file)))
        (or (vc-backend ,filevar)
-           (error (format "File not under version control: `%s'" file)))
+           (error "File not under version control: `%s'" file))
        (unless (vc-editable-p ,filevar)
          (let ((state (vc-state ,filevar)))
            (if (stringp state)
-               (error (format "`%s' is locking `%s'" state ,filevar))
+               (error "`%s' is locking `%s'" state ,filevar)
              (vc-checkout ,filevar t))))
        (save-excursion
          ,@body)
@@ -2487,7 +2487,7 @@ A prefix argument NOREVERT means do not revert the buffer afterwards."
      ((not (vc-call latest-on-branch-p file))
       (error "This is not the latest version; VC cannot cancel it"))
      ((not (vc-up-to-date-p file))
-      (error (substitute-command-keys "File is not up to date; use \\[vc-revert-buffer] to discard changes"))))
+      (error "%s" (substitute-command-keys "File is not up to date; use \\[vc-revert-buffer] to discard changes"))))
     (if (null (yes-or-no-p (format "Remove version %s from master? " target)))
        (error "Aborted")
       (setq norevert (or norevert (not
@@ -2816,9 +2816,6 @@ Uses `rcs2log' which only works for RCS and CVS."
 (defvar vc-annotate-parent-file nil)
 (defvar vc-annotate-parent-rev nil)
 (defvar vc-annotate-parent-display-mode nil)
-(make-local-variable 'vc-annotate-parent-file)
-(make-local-variable 'vc-annotate-parent-rev)
-(make-local-variable 'vc-annotate-parent-display-mode)
 
 (defconst vc-annotate-font-lock-keywords
   ;; The fontification is done by vc-annotate-lines instead of font-lock.
@@ -3038,9 +3035,10 @@ colors. `vc-annotate-background' specifies the background color."
                        vc-annotate-version))
     (save-excursion
       (set-buffer temp-buffer-name)
-      (setq vc-annotate-parent-file bfn)
-      (setq vc-annotate-parent-rev vc-annotate-version)
-      (setq vc-annotate-parent-display-mode vc-annotate-display-mode))
+      (set (make-local-variable 'vc-annotate-parent-file) bfn)
+      (set (make-local-variable 'vc-annotate-parent-rev) vc-annotate-version)
+      (set (make-local-variable 'vc-annotate-parent-display-mode)
+          vc-annotate-display-mode))
           
     ;; Don't use the temp-buffer-name until the buffer is created
     ;; (only after `with-output-to-temp-buffer'.)
@@ -3146,7 +3144,7 @@ string, then it describes a revision number, so warp to that
 revision."
   (if (not (equal major-mode 'vc-annotate-mode))
       (message "Cannot be invoked outside of a vc annotate buffer")
-    (let* ((oldline (line-at-pos))
+    (let* ((oldline (line-number-at-pos))
           (revspeccopy revspec)
           (newrev nil))
       (cond
@@ -3178,7 +3176,7 @@ revision."
        (switch-to-buffer (car (car (last vc-annotate-buffers))))
        (goto-line (min oldline (progn (goto-char (point-max))
                                       (previous-line)
-                                      (line-at-pos))))))))
+                                      (line-number-at-pos))))))))
 
 (defun vc-annotate-car-last-cons (a-list)
   "Return car of last cons in association list A-LIST."