Use own implementation of ag frontend.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 23 Feb 2017 00:42:06 +0200
changeset 1494 874f705f7be4
parent 1493 d242edfd1321
child 1495 d76487c37e61
Use own implementation of ag frontend.
.emacs-my
.emacs-obsolete
--- 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))