diff --git a/lisp/isearch.el b/lisp/isearch.el index 095f8ba145..c52718d94a 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2583,7 +2585,7 @@ isearch-yank-from-kill-ring "Read a string from the `kill-ring' and append it to the search string." (interactive) (with-isearch-suspended - (let ((string (read-from-kill-ring))) + (let ((string (read-from-kill-ring "Yank from kill-ring: "))) (if (and isearch-case-fold-search (eq 'not-yanks search-upper-case)) (setq string (downcase string))) diff --git a/lisp/simple.el b/lisp/simple.el index 90942df0da..08c7c903a8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5587,7 +5587,8 @@ yank-pop property, in the way that `yank' does." (interactive "p") (if (not (eq last-command 'yank)) - (yank-from-kill-ring (read-from-kill-ring) current-prefix-arg) + (yank-from-kill-ring (read-from-kill-ring "Yank from kill-ring: ") + current-prefix-arg) (setq this-command 'yank) (unless arg (setq arg 1)) (let ((inhibit-read-only t) @@ -5676,7 +5677,7 @@ rotate-yank-pointer (current-kill arg)) (defvar read-from-kill-ring-history) -(defun read-from-kill-ring () +(defun read-from-kill-ring (prompt) "Read a `kill-ring' entry using completion and minibuffer history." ;; `current-kill' updates `kill-ring' with a possible interprogram-paste (current-kill 0) @@ -5721,11 +5722,7 @@ read-from-kill-ring (define-key map "?" nil) map))) (completing-read - ;; FIXME: This prompt is specific to using this function from - ;; yank-related commands, but the function could be used in - ;; other contexts. Should the prompt be passed via an - ;; argument? - "Yank from kill-ring: " + prompt (lambda (string pred action) (if (eq action 'metadata) ;; Keep sorted by recency @@ -5755,7 +5752,8 @@ yank-from-kill-ring beginning of the inserted text and mark at the end, like `yank' does. When called from Lisp, insert STRING like `insert-for-yank' does." - (interactive (list (read-from-kill-ring) current-prefix-arg)) + (interactive (list (read-from-kill-ring "Yank from kill-ring: ") + current-prefix-arg)) (push-mark) (insert-for-yank string) (if (consp arg)