diff options
author | Karl Heuer <kwzh@gnu.org> | 1996-01-09 23:14:47 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1996-01-09 23:14:47 +0000 |
commit | 2f29e0c6d98976c706792255d157f4b8d142d16d (patch) | |
tree | 56865669da369370c55f8b65a2b0bbf68b2f8082 /lisp/diff.el | |
parent | f750c3604ee42e61a4a7b3e00e5340cf63485ecd (diff) | |
download | emacs-2f29e0c6d98976c706792255d157f4b8d142d16d.tar.gz |
(diff): Set compilation-exit-message-function.
Diffstat (limited to 'lisp/diff.el')
-rw-r--r-- | lisp/diff.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/diff.el b/lisp/diff.el index eb2e4152896..2d681b8af27 100644 --- a/lisp/diff.el +++ b/lisp/diff.el @@ -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) |