Variable: grep-use-null-device

grep-use-null-device is a customizable variable defined in grep.el.gz.

Value

auto-detect

Documentation

If t, append the value of null-device(var)/null-device(fun) to grep commands.

This is done to ensure that the output of grep includes the filename of any match in the case where only a single file is searched, and is not necessary if the grep program used supports the -H option.

In interactive usage, the actual value of this variable is set up by grep-compute-defaults; to change the default value, use M-x customize (customize) or call the function grep-apply-setting.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/grep.el.gz
(defcustom grep-use-null-device 'auto-detect
  "If t, append the value of `null-device' to `grep' commands.
This is done to ensure that the output of grep includes the filename of
any match in the case where only a single file is searched, and is not
necessary if the grep program used supports the `-H' option.

In interactive usage, the actual value of this variable is set up
by `grep-compute-defaults'; to change the default value, use
\\[customize] or call the function `grep-apply-setting'."
  :type '(choice (const :tag "Do Not Append Null Device" nil)
		 (const :tag "Append Null Device" t)
		 (other :tag "Not Set" auto-detect))
  :set #'grep-apply-setting)