X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/5dccbe61cac7ca2df7cf5fac9b8b2367f2784964..5aa1b95f79523e4fdc509fd623e8d271bceb34f7:/el/dot-emacs.el diff --git a/el/dot-emacs.el b/el/dot-emacs.el index c042a8c..4601e23 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -902,6 +902,10 @@ doesn't match any of the regular expressions in (((type tty) (class color)) :background "blue") (((type tty) (class mono)) :inverse-video t) (t :background "grey30")) +(mdw-define-face match + (((type tty) (class color)) :background "blue") + (((type tty) (class mono)) :inverse-video t) + (t :background "blue")) (mdw-define-face mc/cursor-face (((type tty) (class mono)) :inverse-video t) (t :background "red")) @@ -1940,7 +1944,6 @@ doesn't match any of the regular expressions in ;; Perl indentation style. -(fset 'perl-mode 'cperl-mode) (setq cperl-indent-level 2) (setq cperl-continued-statement-offset 2) (setq cperl-continued-brace-offset 0) @@ -3190,6 +3193,19 @@ This allows you to pass a list of arguments through `ansi-term'." (interactive "sHost: ") (ansi-term (list "ssh" host) (format "ssh@%s" host))) +(defvar git-grep-command + "env PAGER=cat git grep --no-color -nH -e " + "*The default command for \\[git-grep].") + +(defvar git-grep-history nil) + +(defun git-grep (command-args) + "Run `git grep' with user-specified args and collect output in a buffer." + (interactive + (list (read-shell-command "Run git grep (like this): " + git-grep-command 'git-grep-history))) + (grep command-args)) + ;;;-------------------------------------------------------------------------- ;;; Inferior Emacs Lisp.