Fix default-directory for vc-root-diff.
[bpt/emacs.git] / lisp / ediff-util.el
index e8a171b..77284a1 100644 (file)
@@ -1,7 +1,7 @@
 ;;; ediff-util.el --- the core commands and utilities of ediff
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
@@ -1126,8 +1126,8 @@ of the current buffer."
 
 (defun ediff-file-checked-in-p (file)
   (and (featurep 'vc-hooks)
-       ;; CVS files are considered not checked in
-       (not (memq (vc-backend file) '(nil CVS)))
+       ;; Only RCS and SCCS files are considered checked in
+       (memq (vc-backend file) '(RCS SCCS))
        (if (fboundp 'vc-state)
           (and
            (not (memq (vc-state file) '(edited needs-merge)))
@@ -3091,6 +3091,12 @@ Hit \\[ediff-recenter] to reset the windows afterward."
   )
 
 
+;; for compatibility
+(defmacro ediff-minibuffer-with-setup-hook (fun &rest body)
+  `(if (fboundp 'minibuffer-with-setup-hook)
+       (minibuffer-with-setup-hook ,fun ,@body)
+     ,@body))
+
 ;; This is adapted from a similar function in `emerge.el'.
 ;; PROMPT should not have a trailing ': ', so that it can be modified
 ;; according to context.
@@ -3118,7 +3124,7 @@ Hit \\[ediff-recenter] to reset the windows afterward."
                        (and default-file (list default-file))
                        default-dir)))
        f)
-    (setq f (minibuffer-with-setup-hook
+    (setq f (ediff-minibuffer-with-setup-hook
                (lambda () (when defaults
                             (setq minibuffer-default defaults)))
              (read-file-name