Rely more on projectile-expand-root

This commit is contained in:
Oleh Krehel 2016-04-14 12:31:09 +02:00
parent 916d4a7034
commit 5633ca5615

View file

@ -54,7 +54,8 @@ With a prefix ARG invalidates the cache first."
:action :action
(lambda (x) (lambda (x)
(with-ivy-window (with-ivy-window
(find-file (expand-file-name x (projectile-project-root))))) (find-file
(projectile-expand-root x))))
:require-match t :require-match t
:caller 'counsel-projectile-find-file) :caller 'counsel-projectile-find-file)
(run-hooks 'projectile-find-file-hook)) (run-hooks 'projectile-find-file-hook))
@ -64,7 +65,7 @@ With a prefix ARG invalidates the cache first."
'(("w" (lambda (x) '(("w" (lambda (x)
(with-ivy-window (with-ivy-window
(find-file-other-window (find-file-other-window
(expand-file-name x (projectile-project-root))))) (projectile-expand-root x))))
"other window"))) "other window")))
;;; counsel-projectile-find-dir ;;; counsel-projectile-find-dir
@ -83,7 +84,8 @@ With a prefix ARG invalidates the cache first."
:action :action
(lambda (x) (lambda (x)
(with-ivy-window (with-ivy-window
(dired (expand-file-name x (projectile-project-root))))) (dired
(projectile-expand-root x))))
:require-match t :require-match t
:caller 'counsel-projectile-find-dir) :caller 'counsel-projectile-find-dir)
(run-hooks 'projectile-find-dir-hook)) (run-hooks 'projectile-find-dir-hook))
@ -92,7 +94,8 @@ With a prefix ARG invalidates the cache first."
'counsel-projectile-find-dir 'counsel-projectile-find-dir
'(("w" (lambda (x) '(("w" (lambda (x)
(with-ivy-window (with-ivy-window
(dired-other-window (expand-file-name x (projectile-project-root))))) (dired-other-window
(projectile-expand-root x))))
"other window"))) "other window")))
;;; counsel-projectile-switch-to-buffer ;;; counsel-projectile-switch-to-buffer