From: Ken Manheimer Date: Mon, 14 Dec 2015 08:05:47 +0000 (-0500) Subject: gist-git-grep mods - i think i've been using this. X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/304898dc16dc9f162c3f32833596b475f962d70b gist-git-grep mods - i think i've been using this. --- diff --git a/gist-git-grep.el b/gist-git-grep.el index a8550ce44..34067f1ba 100644 --- a/gist-git-grep.el +++ b/gist-git-grep.el @@ -27,26 +27,28 @@ (when (not root) (setq root git-grep-default-work-tree) (message "git-grep: %s doesn't look like a git working tree; searching from %s instead" default-directory root)) - (list (read-shell-command "Run git-grep (like this): " - (format (concat - "cd %s && " - "%s -e %s") - root - git-grep-switches - (let ((thing (and - - ; don't snarf stuff from the - ; buffer if we're not looking - ; at a file. Perhaps we - ; should also check to see if - ; the file is part of a git - ; repo. - buffer-file-name - (thing-at-point 'symbol)))) - (or (and thing (progn - (set-text-properties 0 (length thing) nil thing) - (shell-quote-argument (regexp-quote thing)))) - ""))) + (list (read-shell-command + "Run git-grep (like this): " + (format (concat + "cd %s && " + "%s -e %s") + root + git-grep-switches + (let ((thing (and + ;; Don't snarf stuff from the buffer if + ;; we're not looking at a file. + ;; Perhaps we should also check to see + ;; if the file is part of a git repo. + buffer-file-name + (thing-at-point + 'symbol)))) + (or (and thing (progn + (set-text-properties 0 + (length thing) + nil thing) + (shell-quote-argument + (regexp-quote thing)))) + ""))) 'git-grep-history)))) (let ((grep-use-null-device nil)) (grep command-args))))