comparison lisp/vc.el @ 87893:160807cd63a7

(vc-diff-sentinel): Do not write a footer if there were differences.
author Glenn Morris <rgm@gnu.org>
date Tue, 22 Jan 2008 06:39:27 +0000
parents 1f9fa02d0cf1
children ee15683c53e8
comparison
equal deleted inserted replaced
87892:3e7b6b0c4599 87893:160807cd63a7
1 ;;; vc.el --- drive a version-control system from within Emacs 1 ;;; vc.el --- drive a version-control system from within Emacs
2 2
3 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 3 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
4 ;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 4 ;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5 ;; Free Software Foundation, Inc.
5 6
6 ;; Author: FSF (see below for full credits) 7 ;; Author: FSF (see below for full credits)
7 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> 8 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
8 ;; Keywords: tools 9 ;; Keywords: tools
9 10
1949 (defun vc-diff-sentinel (verbose rev1-name rev2-name) 1950 (defun vc-diff-sentinel (verbose rev1-name rev2-name)
1950 ;; The empty sync output case has already been handled, so the only 1951 ;; The empty sync output case has already been handled, so the only
1951 ;; possibility of an empty output is for an async process, in which case 1952 ;; possibility of an empty output is for an async process, in which case
1952 ;; it's important to insert the "diffs end here" message in the buffer 1953 ;; it's important to insert the "diffs end here" message in the buffer
1953 ;; since the user may miss a message in the echo area. 1954 ;; since the user may miss a message in the echo area.
1954 (when verbose 1955 (and verbose
1955 (let ((inhibit-read-only t)) 1956 (zerop (buffer-size))
1956 (if (eq (buffer-size) 0) 1957 (let ((inhibit-read-only t))
1957 (insert "No differences found.\n") 1958 (insert "No differences found.\n")))
1958 (insert (format "\n\nDiffs between %s and %s end here." rev1-name rev2-name)))))
1959 (goto-char (point-min)) 1959 (goto-char (point-min))
1960 (shrink-window-if-larger-than-buffer)) 1960 (shrink-window-if-larger-than-buffer))
1961 1961
1962 (defvar vc-diff-added-files nil 1962 (defvar vc-diff-added-files nil
1963 "If non-nil, diff added files by comparing them to /dev/null.") 1963 "If non-nil, diff added files by comparing them to /dev/null.")