cp-find-file / cp-find-dir: run hook inside actions
This commit is contained in:
parent
7b9a81ce5c
commit
c0c60d63bc
1 changed files with 10 additions and 8 deletions
|
|
@ -76,16 +76,17 @@ With a prefix ARG invalidates the cache first."
|
||||||
(cons name (expand-file-name name root)))
|
(cons name (expand-file-name name root)))
|
||||||
(projectile-current-project-files)))
|
(projectile-current-project-files)))
|
||||||
:action (lambda (x)
|
:action (lambda (x)
|
||||||
(find-file (cdr x)))
|
(find-file (cdr x))
|
||||||
|
(run-hooks 'projectile-find-file-hook))
|
||||||
:require-match t
|
:require-match t
|
||||||
:keymap counsel-projectile-map
|
:keymap counsel-projectile-map
|
||||||
:caller 'counsel-projectile-find-file)
|
:caller 'counsel-projectile-find-file))
|
||||||
(run-hooks 'projectile-find-file-hook))
|
|
||||||
|
|
||||||
(ivy-set-actions
|
(ivy-set-actions
|
||||||
'counsel-projectile-find-file
|
'counsel-projectile-find-file
|
||||||
'(("j" (lambda (x)
|
'(("j" (lambda (x)
|
||||||
(find-file-other-window (cdr x)))
|
(find-file-other-window (cdr x))
|
||||||
|
(run-hooks 'projectile-find-file-hook))
|
||||||
"other window")))
|
"other window")))
|
||||||
|
|
||||||
;;; counsel-projectile-find-dir
|
;;; counsel-projectile-find-dir
|
||||||
|
|
@ -105,16 +106,17 @@ With a prefix ARG invalidates the cache first."
|
||||||
(append '("./") (projectile-current-project-dirs))
|
(append '("./") (projectile-current-project-dirs))
|
||||||
(projectile-current-project-dirs))))
|
(projectile-current-project-dirs))))
|
||||||
:action (lambda (x)
|
:action (lambda (x)
|
||||||
(dired (cdr x)))
|
(dired (cdr x))
|
||||||
|
(run-hooks 'projectile-find-dir-hook))
|
||||||
:require-match t
|
:require-match t
|
||||||
:keymap counsel-projectile-map
|
:keymap counsel-projectile-map
|
||||||
:caller 'counsel-projectile-find-dir)
|
:caller 'counsel-projectile-find-dir))
|
||||||
(run-hooks 'projectile-find-dir-hook))
|
|
||||||
|
|
||||||
(ivy-set-actions
|
(ivy-set-actions
|
||||||
'counsel-projectile-find-dir
|
'counsel-projectile-find-dir
|
||||||
'(("j" (lambda (x)
|
'(("j" (lambda (x)
|
||||||
(dired-other-window (cdr x)))
|
(dired-other-window (cdr x))
|
||||||
|
(run-hooks 'projectile-find-dir-hook))
|
||||||
"other window")))
|
"other window")))
|
||||||
|
|
||||||
;;; counsel-projectile-switch-to-buffer
|
;;; counsel-projectile-switch-to-buffer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue