Refactor counsel-find-file actions

Conform them to naming conventions & only autoload the functions that
aren't used immediately.
This commit is contained in:
Henrik Lissner 2018-07-05 14:05:09 +02:00
parent cd26e11e94
commit 2d30d996c3
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 17 additions and 17 deletions

View file

@ -197,21 +197,9 @@ search current file. See `+ivy-task-tags' to customize what this searches for."
(run-hooks 'counsel-grep-post-action-hook)
(selected-window))))))
;;;###autoload
(defun +ivy/reloading (cmd)
(lambda (x)
(funcall cmd x)
(ivy--reset-state ivy-last)))
;;;###autoload
(defun +ivy/given-file (cmd prompt)
(lambda (source)
(let ((target
(let ((enable-recursive-minibuffers t))
(read-file-name
(format "%s %s to:" prompt source)))))
(funcall cmd source target 1))))
(defun +ivy-confirm-delete-file (x)
(dired-delete-file x 'confirm-each-subdirectory))
;;