* lisp/progmodes/grep.el (grep-process-setup): Don't check code for 1

because `zgrep' returns 1 for successful matches.

Fixes: debbugs:9226
This commit is contained in:
Juri Linkov 2011-09-18 23:20:08 +03:00
parent d18b513ba7
commit 46c5cf6650
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2011-09-18 Juri Linkov <juri@jurta.org>
* progmodes/grep.el (grep-process-setup): Don't check code for 1
because `zgrep' returns 1 for successful matches (bug#9226).
2011-09-18 Juri Linkov <juri@jurta.org>
* info.el (Info-extract-menu-node-name): Check the second match

View file

@ -476,7 +476,7 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
;; so the buffer is still unmodified if there is no output.
(cond ((and (zerop code) (buffer-modified-p))
'("finished (matches found)\n" . "matched"))
((or (= code 1) (not (buffer-modified-p)))
((not (buffer-modified-p))
'("finished with no matches found\n" . "no match"))
(t
(cons msg code)))