* lisp/progmodes/grep.el (grep-process-setup): Don't check code for 1
authorJuri Linkov <juri@jurta.org>
Sun, 18 Sep 2011 20:20:08 +0000 (23:20 +0300)
committerJuri Linkov <juri@jurta.org>
Sun, 18 Sep 2011 20:20:08 +0000 (23:20 +0300)
because `zgrep' returns 1 for successful matches.

Fixes: debbugs:9226

lisp/ChangeLog
lisp/progmodes/grep.el

index b820fc2..c8e9faa 100644 (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
index 000243b..2c68a29 100644 (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)))