Commit 2f29e0c6 authored by Karl Heuer's avatar Karl Heuer
Browse files

(diff): Set compilation-exit-message-function.

parent f750c360
......@@ -220,6 +220,19 @@ With prefix arg, prompt for diff switches."
"No more differences" "Diff"
'diff-parse-differences))
(pop-to-buffer buf)
;; Avoid frightening people with "abnormally terminated"
;; if diff finds differences.
(set (make-local-variable 'compilation-exit-message-function)
(lambda (proc msg)
(let ((code (process-exit-status proc)))
(if (eq (process-status proc) 'exit)
(cond ((zerop code)
'("finished (no differences)\n" . "finished"))
((= code 1)
'("finished\n" . "finished"))
(t
(cons msg code)))
(cons msg code)))))
(set (make-local-variable 'diff-old-file) old)
(set (make-local-variable 'diff-new-file) new)
(set (make-local-variable 'diff-old-temp-file) old-alt)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment