Function: grep-exit-message
grep-exit-message is a byte-compiled function defined in grep.el.gz.
Signature
(grep-exit-message STATUS CODE MSG)
Documentation
Return a status message for grep results.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/grep.el.gz
(defun grep-exit-message (status code msg)
"Return a status message for grep results."
(if (eq status 'exit)
;; This relies on the fact that `compilation-start'
;; sets buffer-modified to nil before running the command,
;; so the buffer is still unmodified if there is no output.
(cond ((and (zerop code) (buffer-modified-p))
(if (> grep-num-matches-found 0)
(cons (format (ngettext "finished with %d match found\n"
"finished with %d matches found\n"
grep-num-matches-found)
grep-num-matches-found)
"matched")
'("finished with matches found\n" . "matched")))
((not (buffer-modified-p))
'("finished with no matches found\n" . "no match"))
(t
(cons msg code)))
(cons msg code)))