equal
deleted
inserted
replaced
815 (interactive) |
815 (interactive) |
816 (let ( (grep-find-template "find . -type f <F> -exec zgrep <C> -nH -e <R> {} +") (grep-find-ignored-files nil) ) |
816 (let ( (grep-find-template "find . -type f <F> -exec zgrep <C> -nH -e <R> {} +") (grep-find-ignored-files nil) ) |
817 (cl-flet ( (grep-compute-defaults () nil) ) |
817 (cl-flet ( (grep-compute-defaults () nil) ) |
818 (call-interactively #'rgrep)))) |
818 (call-interactively #'rgrep)))) |
819 |
819 |
820 (ignore-errors (require 'ag)) |
820 (global-set-key [f7] 'my/ag) |
821 |
|
822 (defun my/ag (regex) |
|
823 "Search with ag from project roor without prefix and from |
|
824 `default-directory' with prefix." |
|
825 (interactive (list (ag/read-from-minibuffer "Search regex"))) |
|
826 (if current-prefix-arg |
|
827 (let ((current-prefix-arg nil)) (ag-regexp regex default-directory)) |
|
828 (ag-project-regexp regex))) |
|
829 |
|
830 (setq ag-highlight-search t) |
|
831 (when (featurep 'ag) |
|
832 (global-set-key [f7] 'my/ag)) |
|
833 |
821 |
834 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
822 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
835 (message "highlighting") |
823 (message "highlighting") |
836 |
824 |
837 ;; Increase scrolling speed by defer consuming operation. |
825 ;; Increase scrolling speed by defer consuming operation. |