Created
April 22, 2014 17:13
-
-
Save ijp/11187193 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun raellear-lgrep (regexp &optional files confirm) | |
(interactive | |
(progn | |
(grep-compute-defaults) | |
(cond | |
((and grep-command (equal current-prefix-arg '(16))) | |
(list (read-from-minibuffer "Run: " grep-command | |
nil nil 'grep-history))) | |
((not grep-template) | |
(error "grep.el: No `grep-template' available")) | |
(t (let* ((regexp (grep-read-regexp)) | |
(files (grep-read-files regexp)) | |
(confirm (equal current-prefix-arg '(4)))) | |
(list regexp files dir confirm)))))) | |
(lgrep regexp files "/insert/your/directory/here/" confirm)) | |
(global-set-key (kbd "C-c g") 'raellear-lgrep) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment