branch: master commit 84b5ece78451f1c40cff30ea25df1ceb3cb48a43 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
counsel.el (counsel-find-file-copy): Use ivy-inhibit-action Lets us re-use `counsel-find-file' without copying its code. Re #1955 --- counsel.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/counsel.el b/counsel.el index 9706ade..4f471a6 100644 --- a/counsel.el +++ b/counsel.el @@ -1817,13 +1817,11 @@ choose between `yes-or-no-p' and `y-or-n-p'; otherwise default to (defun counsel-find-file-copy (x) "Copy file X." - (ivy-read "Copy file to: " #'read-file-name-internal - :matcher #'counsel--find-file-matcher - :action (lambda (new-name) - (require 'dired-aux) - (dired-copy-file x new-name 1)) - :keymap counsel-find-file-map - :caller 'counsel-find-file-copy)) + (let ((ivy-inhibit-action + (lambda (new-name) + (require 'dired-aux) + (dired-copy-file x new-name 1)))) + (counsel-find-file))) (defun counsel-find-file-delete (x) "Delete file X."