From 46c5cf6650c166aca02bc2305d0c4e2784e1de3a Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 18 Sep 2011 23:20:08 +0300 Subject: [PATCH] * lisp/progmodes/grep.el (grep-process-setup): Don't check code for 1 because `zgrep' returns 1 for successful matches. Fixes: debbugs:9226 --- lisp/ChangeLog | 5 +++++ lisp/progmodes/grep.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b820fc24d51..c8e9faa3a2b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-18 Juri Linkov + + * 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 * info.el (Info-extract-menu-node-name): Check the second match diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 000243b05df..2c68a29dd00 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -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))) -- 2.39.2