1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 15:21:46 +00:00

Make `M-x grep' work better with "git grep"

* lisp/progmodes/compile.el (compilation-start): Bind PAGER to ""
to avoid errors in output from "git grep" and similar commands
(bug#4359).
This commit is contained in:
Lars Ingebrigtsen 2022-06-02 15:06:27 +02:00
parent 52e527a02f
commit da736c9f02

View File

@ -1956,6 +1956,9 @@ Returns the compilation buffer created."
(and (derived-mode-p 'comint-mode)
(comint-term-environment))
(list (format "INSIDE_EMACS=%s,compile" emacs-version))
;; Some external programs (like "git grep") use a pager;
;; defeat that.
(list "PAGER=")
(copy-sequence process-environment))))
(setq-local compilation-arguments
(list command mode name-function highlight-regexp))