Use own implementation of ag frontend.
--- a/.emacs-my Thu Feb 23 00:40:50 2017 +0200
+++ b/.emacs-my Thu Feb 23 00:42:06 2017 +0200
@@ -817,19 +817,7 @@
(cl-flet ( (grep-compute-defaults () nil) )
(call-interactively #'rgrep))))
-(ignore-errors (require 'ag))
-
-(defun my/ag (regex)
- "Search with ag from project roor without prefix and from
-`default-directory' with prefix."
- (interactive (list (ag/read-from-minibuffer "Search regex")))
- (if current-prefix-arg
- (let ((current-prefix-arg nil)) (ag-regexp regex default-directory))
- (ag-project-regexp regex)))
-
-(setq ag-highlight-search t)
-(when (featurep 'ag)
- (global-set-key [f7] 'my/ag))
+(global-set-key [f7] 'my/ag)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "highlighting")
--- a/.emacs-obsolete Thu Feb 23 00:40:50 2017 +0200
+++ b/.emacs-obsolete Thu Feb 23 00:42:06 2017 +0200
@@ -354,3 +354,19 @@
(smex-initialize)
(global-set-key (kbd "M-X") 'smex))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "ag)
+
+(ignore-errors (require 'ag))
+
+(defun my/ag (regex)
+ "Search with ag from project roor without prefix and from
+`default-directory' with prefix."
+ (interactive (list (ag/read-from-minibuffer "Search regex")))
+ (if current-prefix-arg
+ (let ((current-prefix-arg nil)) (ag-regexp regex default-directory))
+ (ag-project-regexp regex)))
+
+(setq ag-highlight-search t)
+(when (featurep 'ag)
+ (global-set-key [f7] 'my/ag))