(ediff-minibuffer-with-setup-hook): New compatibility macro.
authorJuri Linkov <juri@jurta.org>
Sun, 29 Nov 2009 23:52:16 +0000 (23:52 +0000)
committerJuri Linkov <juri@jurta.org>
Sun, 29 Nov 2009 23:52:16 +0000 (23:52 +0000)
(ediff-read-file-name): Use it instead of `minibuffer-with-setup-hook'.

lisp/ChangeLog
lisp/ediff-util.el

index 234d504..cace9ed 100644 (file)
@@ -1,3 +1,10 @@
+2009-11-29  Juri Linkov  <juri@jurta.org>
+
+       * ediff-util.el (ediff-minibuffer-with-setup-hook):
+       New compatibility macro.
+       (ediff-read-file-name): Use it instead of
+       `minibuffer-with-setup-hook'.
+
 2009-11-29  Juri Linkov  <juri@jurta.org>
 
        Add defcustom to define the cycling order of `recenter-top-bottom'.
index e8a171b..4dfd6f6 100644 (file)
@@ -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