Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
262a1439
Commit
262a1439
authored
Aug 22, 2011
by
Juri Linkov
Browse files
* lisp/progmodes/grep.el (grep-process-setup): Use `buffer-modified-p'
to check for empty output. Fixes: debbugs:9226
parent
f13f86fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/progmodes/grep.el
lisp/progmodes/grep.el
+5
-2
No files found.
lisp/ChangeLog
View file @
262a1439
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
...
...
lisp/progmodes/grep.el
View file @
262a1439
...
...
@@ -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
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment