mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* lisp/progmodes/grep.el (grep-process-setup): Use `buffer-modified-p'
to check for empty output. Fixes: debbugs:9226
This commit is contained in:
parent
f13f86fbf2
commit
262a14396d
2 changed files with 10 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2011-08-22 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* progmodes/grep.el (grep-process-setup): Use `buffer-modified-p'
|
||||
to check for empty output (bug#9226).
|
||||
|
||||
2011-08-22 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* progmodes/scheme.el (scheme-mode-syntax-table): Don't use
|
||||
|
|
|
|||
|
|
@ -463,9 +463,12 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
|
|||
(set (make-local-variable 'compilation-exit-message-function)
|
||||
(lambda (status code msg)
|
||||
(if (eq status 'exit)
|
||||
(cond ((zerop code)
|
||||
;; 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))
|
||||
'("finished (matches found)\n" . "matched"))
|
||||
((= code 1)
|
||||
((or (= code 1) (not (buffer-modified-p)))
|
||||
'("finished with no matches found\n" . "no match"))
|
||||
(t
|
||||
(cons msg code)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue