Function: diff-sentinel

diff-sentinel is a byte-compiled function defined in diff.el.gz.

Signature

(diff-sentinel CODE &optional OLD-TEMP-FILE NEW-TEMP-FILE)

Documentation

Code run when the diff process exits.

CODE is the exit code of the process. It should be 0 only if no diffs were found. If optional args OLD-TEMP-FILE and/or NEW-TEMP-FILE are non-nil, delete the temporary files so named.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/diff.el.gz
(defun diff-sentinel (code &optional old-temp-file new-temp-file)
  "Code run when the diff process exits.
CODE is the exit code of the process.  It should be 0 only if no diffs
were found.
If optional args OLD-TEMP-FILE and/or NEW-TEMP-FILE are non-nil,
delete the temporary files so named."
  (if old-temp-file (delete-file old-temp-file))
  (if new-temp-file (delete-file new-temp-file))
  (diff-setup-whitespace)
  (goto-char (point-min))
  (save-excursion
    (goto-char (point-max))
    (let ((inhibit-read-only t))
      (insert (format "\nDiff finished%s.  %s\n"
		      (cond ((equal 0 code) " (no differences)")
			    ((equal 2 code) " (diff error)")
			    (t ""))
		      (current-time-string))))))