changeset 106318:ef396422d3f1

(ediff-minibuffer-with-setup-hook): New compatibility macro. (ediff-read-file-name): Use it instead of `minibuffer-with-setup-hook'.
author Juri Linkov <juri@jurta.org>
date Sun, 29 Nov 2009 23:52:16 +0000
parents c5e66d596cbf
children 08ca950f4781
files lisp/ChangeLog lisp/ediff-util.el
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Nov 29 23:38:18 2009 +0000
+++ b/lisp/ChangeLog	Sun Nov 29 23:52:16 2009 +0000
@@ -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'.
--- a/lisp/ediff-util.el	Sun Nov 29 23:38:18 2009 +0000
+++ b/lisp/ediff-util.el	Sun Nov 29 23:52:16 2009 +0000
@@ -3091,6 +3091,12 @@
   )
 
 
+;; 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 @@
 			(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