From f8d170a48f48e0911235344777d14ce060b6b61c Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 29 Nov 2009 23:52:16 +0000 Subject: [PATCH] (ediff-minibuffer-with-setup-hook): New compatibility macro. (ediff-read-file-name): Use it instead of `minibuffer-with-setup-hook'. --- lisp/ChangeLog | 7 +++++++ lisp/ediff-util.el | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 234d50442d4..cace9edd751 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2009-11-29 Juri Linkov + + * 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 Add defcustom to define the cycling order of `recenter-top-bottom'. diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index e8a171bf517..4dfd6f60518 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el @@ -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 -- 2.39.5