comparison lisp/diff.el @ 14106:4302535a19eb

(diff): Set compilation-exit-message-function.
author Karl Heuer <kwzh@gnu.org>
date Tue, 09 Jan 1996 23:14:47 +0000
parents 093d80b4ae17
children db5e78740d5c
comparison
equal deleted inserted replaced
14105:d8384341d55a 14106:4302535a19eb
218 (setq buf 218 (setq buf
219 (compile-internal command 219 (compile-internal command
220 "No more differences" "Diff" 220 "No more differences" "Diff"
221 'diff-parse-differences)) 221 'diff-parse-differences))
222 (pop-to-buffer buf) 222 (pop-to-buffer buf)
223 ;; Avoid frightening people with "abnormally terminated"
224 ;; if diff finds differences.
225 (set (make-local-variable 'compilation-exit-message-function)
226 (lambda (proc msg)
227 (let ((code (process-exit-status proc)))
228 (if (eq (process-status proc) 'exit)
229 (cond ((zerop code)
230 '("finished (no differences)\n" . "finished"))
231 ((= code 1)
232 '("finished\n" . "finished"))
233 (t
234 (cons msg code)))
235 (cons msg code)))))
223 (set (make-local-variable 'diff-old-file) old) 236 (set (make-local-variable 'diff-old-file) old)
224 (set (make-local-variable 'diff-new-file) new) 237 (set (make-local-variable 'diff-new-file) new)
225 (set (make-local-variable 'diff-old-temp-file) old-alt) 238 (set (make-local-variable 'diff-old-temp-file) old-alt)
226 (set (make-local-variable 'diff-new-temp-file) new-alt) 239 (set (make-local-variable 'diff-new-temp-file) new-alt)
227 (set (make-local-variable 'compilation-finish-function) 240 (set (make-local-variable 'compilation-finish-function)