equal
deleted
inserted
replaced
352 (ignore-errors |
352 (ignore-errors |
353 (require 'smex) |
353 (require 'smex) |
354 (smex-initialize) |
354 (smex-initialize) |
355 (global-set-key (kbd "M-X") 'smex)) |
355 (global-set-key (kbd "M-X") 'smex)) |
356 |
356 |
|
357 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
358 (message "ag) |
|
359 |
|
360 (ignore-errors (require 'ag)) |
|
361 |
|
362 (defun my/ag (regex) |
|
363 "Search with ag from project roor without prefix and from |
|
364 `default-directory' with prefix." |
|
365 (interactive (list (ag/read-from-minibuffer "Search regex"))) |
|
366 (if current-prefix-arg |
|
367 (let ((current-prefix-arg nil)) (ag-regexp regex default-directory)) |
|
368 (ag-project-regexp regex))) |
|
369 |
|
370 (setq ag-highlight-search t) |
|
371 (when (featurep 'ag) |
|
372 (global-set-key [f7] 'my/ag)) |