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.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/org/org-refile.el b/lisp/org/org-refile.el
index 5ad73422efa..71d00a7a22b 100644
--- a/lisp/org/org-refile.el
+++ b/lisp/org/org-refile.el
@@ -577,7 +577,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(with-demoted-errors "Bookmark set error: %S"
(bookmark-set bookmark-name))))
(move-marker org-capture-last-stored-marker (point)))
- (when (fboundp 'deactivate-mark) (deactivate-mark))
+ (deactivate-mark)
(run-hooks 'org-after-refile-insert-hook)))
(unless org-refile-keep
(if regionp
@@ -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)