From: Glenn Morris Date: Tue, 22 Jan 2008 06:39:44 +0000 (+0000) Subject: (vc-diff-sentinel): Do not write a footer if there were differences. X-Git-Tag: emacs-pretest-23.0.90~8468 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f52749ed49f1793cf6d89f4f37039b6d70ae291c;p=emacs.git (vc-diff-sentinel): Do not write a footer if there were differences. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5045c30b3e4..6fd1b706a9c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-01-22 Glenn Morris + + * vc.el (vc-diff-sentinel): Do not write a footer if there were + differences. + 2008-01-21 Reiner Steib * pcvs-defs.el (cvs-menu): Improve cvs-mode-find-file, diff --git a/lisp/vc.el b/lisp/vc.el index ffe38a68521..38338d7f395 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1,7 +1,8 @@ ;;; vc.el --- drive a version-control system from within Emacs ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, -;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +;; Free Software Foundation, Inc. ;; Author: FSF (see below for full credits) ;; Maintainer: Andre Spiegel @@ -1951,11 +1952,10 @@ the buffer contents as a comment." ;; possibility of an empty output is for an async process, in which case ;; it's important to insert the "diffs end here" message in the buffer ;; since the user may miss a message in the echo area. - (when verbose - (let ((inhibit-read-only t)) - (if (eq (buffer-size) 0) - (insert "No differences found.\n") - (insert (format "\n\nDiffs between %s and %s end here." rev1-name rev2-name))))) + (and verbose + (zerop (buffer-size)) + (let ((inhibit-read-only t)) + (insert "No differences found.\n"))) (goto-char (point-min)) (shrink-window-if-larger-than-buffer))