rm unnecessary calls to projectile-project-p
This commit is contained in:
parent
e200bce2ff
commit
499bc4cc23
1 changed files with 77 additions and 83 deletions
|
|
@ -609,7 +609,6 @@ additional options to be passed to grep, or an alternative git
|
|||
grep command. It is read from the minibuffer if the function is
|
||||
called with a prefix argument."
|
||||
(interactive)
|
||||
(if (projectile-project-p)
|
||||
(if (and (eq (projectile-project-vcs) 'git)
|
||||
projectile-use-git-grep)
|
||||
(let ((counsel-prompt-function
|
||||
|
|
@ -652,8 +651,7 @@ called with a prefix argument."
|
|||
:unwind (lambda ()
|
||||
(counsel-delete-process)
|
||||
(swiper--cleanup))
|
||||
:caller 'counsel-projectile-grep)))
|
||||
(user-error "You're not in a project")))
|
||||
:caller 'counsel-projectile-grep))))
|
||||
|
||||
(counsel-set-async-exit-code 'counsel-projectile-grep 1 "No matches found")
|
||||
(ivy-set-occur 'counsel-projectile-grep 'counsel-projectile-grep-occur)
|
||||
|
|
@ -672,7 +670,6 @@ OPTIONS, if non-nil, is a string containing additional options to
|
|||
be passed to ag. It is read from the minibuffer if the function
|
||||
is called with a prefix argument."
|
||||
(interactive)
|
||||
(if (projectile-project-p)
|
||||
(let* ((ignored (mapconcat (lambda (i)
|
||||
(concat "--ignore "
|
||||
(shell-quote-argument i)
|
||||
|
|
@ -689,8 +686,7 @@ is called with a prefix argument."
|
|||
(counsel-ag (eval counsel-projectile-ag-initial-input)
|
||||
(projectile-project-root)
|
||||
options
|
||||
(projectile-prepend-project-name "ag")))
|
||||
(user-error "You're not in a project")))
|
||||
(projectile-prepend-project-name "ag"))))
|
||||
|
||||
;;; counsel-projectile-rg
|
||||
|
||||
|
|
@ -705,7 +701,6 @@ OPTIONS, if non-nil, is a string containing additional options to
|
|||
be passed to rg. It is read from the minibuffer if the function
|
||||
is called with a prefix argument."
|
||||
(interactive)
|
||||
(if (projectile-project-p)
|
||||
(let* ((ignored (mapconcat (lambda (i)
|
||||
(concat "--glob "
|
||||
(shell-quote-argument (concat "!" i))
|
||||
|
|
@ -722,8 +717,7 @@ is called with a prefix argument."
|
|||
(counsel-rg (eval counsel-projectile-rg-initial-input)
|
||||
(projectile-project-root)
|
||||
options
|
||||
(projectile-prepend-project-name "rg")))
|
||||
(user-error "You're not in a project")))
|
||||
(projectile-prepend-project-name "rg"))))
|
||||
|
||||
;;; counsel-projectile-org-capture
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue