summaryrefslogtreecommitdiff
path: root/lisp/org/org-refile.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org-refile.el')
-rw-r--r--lisp/org/org-refile.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/org/org-refile.el b/lisp/org/org-refile.el
index 5dfffe78519..8e1ab7439e6 100644
--- a/lisp/org/org-refile.el
+++ b/lisp/org/org-refile.el
@@ -640,11 +640,13 @@ this function appends the default value from
org-refile-target-table))
(completion-ignore-case t)
cdef
- (prompt (concat prompt
- (or (and (car org-refile-history)
- (concat " (default " (car org-refile-history) ")"))
- (and (assoc cbnex tbl) (setq cdef cbnex)
- (concat " (default " cbnex ")"))) ": "))
+ (prompt (let ((default (or (car org-refile-history)
+ (and (assoc cbnex tbl) (setq cdef cbnex)
+ cbnex))))
+ ;; `format-prompt' is new in Emacs 28.1.
+ (if (fboundp 'format-prompt)
+ (format-prompt prompt default)
+ (concat prompt " (default " default ": "))))
pa answ parent-target child parent old-hist)
(setq old-hist org-refile-history)
(setq answ (funcall cfunc prompt tbl nil (not new-nodes)