elisp - make emacs rgrep default to last search term rather than word at point -
in emacs, there way make rgrep default searching last term passed rather word @ point? want former rather latter. looked @ rgrep, silent on point.
if pick through source code, find can want setting variable find-tag-default-function. redefine function grep-tag-default, or associate property major mode via put. here's solution sets variable:
(setq find-tag-default-function 'last-grep-tag) (defun last-grep-tag () (if grep-regexp-history (car grep-regexp-history) ""))
Comments
Post a Comment