branch: externals/ivy-hydra
commit 3c6e5daccbc8678ee881b435ac956778de82a076
Author: Rudi Grinberg <[email protected]>
Commit: Rudi Grinberg <[email protected]>
Remove counsel--grep-mode-occur
It's not used anywhere and its functionality is subsumed by
swiper--occur-insert-lines.
Signed-off-by: Rudi Grinberg <[email protected]>
---
counsel.el | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/counsel.el b/counsel.el
index 03762d6..f8e94db 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2731,26 +2731,6 @@ INITIAL-DIRECTORY, if non-nil, is used as the root
directory for search."
:caller 'counsel-dired-jump)))
;;* Grep
-(defun counsel--grep-mode-occur (git-grep-dir-is-file)
- "Generate a custom occur buffer for grep like commands.
-If GIT-GREP-DIR-IS-FILE is t, then `ivy-state-directory' is treated as a full
-path to a file rather than a directory (e.g. for `counsel-grep-occur').
-
-This function expects that the candidates have already been filtered.
-It applies no filtering to ivy--all-candidates."
- (unless (eq major-mode 'ivy-occur-grep-mode)
- (ivy-occur-grep-mode))
- (let ((directory
- (if git-grep-dir-is-file
- (file-name-directory (ivy-state-directory ivy-last))
- (ivy-state-directory ivy-last))))
- (setq default-directory directory)
- ;; Need precise number of header lines for `wgrep' to work.
- (insert (format "-*- mode:grep; default-directory: %S -*-\n\n\n"
default-directory))
- (insert (format "%d candidates:\n" (length ivy--all-candidates)))
- (ivy--occur-insert-lines
- (mapcar #'counsel--normalize-grep-match ivy--all-candidates))))
-
;;** `counsel-ag'
(defvar counsel-ag-map
(let ((map (make-sparse-keymap)))