# HG changeset patch # User Karl Heuer # Date 821229287 0 # Node ID 4302535a19eb3bb6e3cfd5d14f931e0a5548b588 # Parent d8384341d55a781c24c4cc23d48835d6f191ef5b (diff): Set compilation-exit-message-function. diff -r d8384341d55a -r 4302535a19eb lisp/diff.el --- a/lisp/diff.el Tue Jan 09 23:08:24 1996 +0000 +++ b/lisp/diff.el Tue Jan 09 23:14:47 1996 +0000 @@ -220,6 +220,19 @@ "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)