         "darcs"
         (format "darcs/%s" (vc-state file)))))
 
-(defun vc-darcs-register (file &optional rev comment)
-  "Add FILE to the darcs repository, and record this.
+(defun vc-darcs-register (files &optional rev comment)
+  "Add FILES to the darcs repository, and record this.
 REV and COMMENT are ignored."
-  (vc-darcs-do-command 'add 0 file))
-
-(defun vc-darcs-checkin (file rev comment)
-  "Record FILE to darcs.  COMMENT is the new comment."
+  ;; Emacs 22 compatibility
+  (when (stringp files)
+    (setq files (list files)))
+  (vc-darcs-do-command 'add 0 files))
+
+(defun vc-darcs-checkin (files rev comment)
+  "Record FILES to darcs.  COMMENT is the new comment."
   (when (not (null rev))
     (error "Cannot specify check-in revision with darcs."))
+  ;; Emacs 22 compatibility
+  (when (stringp files)
+    (setq files (list files)))
   (let* ((date (format-time-string "%Y%m%d%H%M%S" nil t))
          (match (string-match "\n" comment))
          (patch-name (if match 

    (when (and rev (not (equal rev (vc-darcs-workfile-version file))))
      (error "Cannot checkout old revisions with darcs."))
    (or (file-exists-p file)
        (vc-darcs-do-command "revert" 0 file "-a"))))

(defun vc-darcs-revert (file &optional contents-done)
  "Revert FILE back to the current workfile version."
  (vc-darcs-do-command "revert" 0 file "-a"))

(defun vc-darcs-print-log (file &optional buffer)
  "Print the logfile for the current darcs repository."
  (vc-do-command buffer 'async vc-darcs-program-name
                 (and (not vc-darcs-full-log) file) "changes"))

(defun vc-darcs-diff (file &optional rev1 rev2 buffer)
  "Show the differences in FILE between revisions REV1 and REV2."

  :type '(choice string (const nil))
  :group 'vc-darcs)

(defun vc-darcs-find-root (file)
  "Return the root darcs repository directory for FILE, or nil if not found."
  (vc-find-root file "_darcs"))
