Commits

Anonymous committed 81d9cf6

2001-12-17 Sean Champ <schamp@users.sourceforge.net>

* vc.el (vc-version-diff): Modified the `interactive' spec of
#'vc-version-diff so it will run the diff on the file in the
current buffer, unless a prefix argument is given, in which case
it'll do the old behavior of querying the user for the name of a
file to run the diff on.

Comments (0)

Files changed (3)

+2001-12-17  Sean Champ  <schamp@users.sourceforge.net>
+
+	* vc.el (vc-version-diff): Modified the `interactive' spec of
+	#'vc-version-diff so it will run the diff on the file in the
+	current buffer, unless a prefix argument is given, in which case
+	it'll do the old behavior of querying the user for the name of a
+	file to run the	diff on. 
+
 2001-12-03  Jonathan Marten  <jonathan.marten@uk.sun.com>
 
 	* vc.el (vc-backend-admin): Set required file properties for
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-VERSION = 1.29
+VERSION = 1.30
 AUTHOR_VERSION =
 MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
 PACKAGE = vc
 (defun vc-version-diff (file rel1 rel2)
   "For FILE, report diffs between two stored versions REL1 and REL2 of it.
 If FILE is a directory, generate diffs between versions for all registered
-files in or below it."
-  (interactive 
-   (let ((file (read-file-name (if buffer-file-name
-				   "File or dir to diff: (default visited file) "
-				 "File or dir to diff: ")
-                                default-directory buffer-file-name t))
-         (rel1-default nil) (rel2-default nil))
+files in or below it.
+
+Interactively, `buffer-file-name' will be used for FILE, unless it's nil, or
+unless a prefix arg is used. In the latter two cases, the user will be queried
+for the name of FILE.
+"
+  (interactive
+    (let ((file (if (and current-prefix-arg buffer-file-name)
+					(read-file-name 
+						(if buffer-file-name
+							"File or dir to diff: (default visited file) "
+						  "File or dir to diff: ")
+						default-directory buffer-file-name t)
+				  buffer-file-name))
+		  (rel1-default nil) (rel2-default nil))
      ;; compute default versions based on the file state
      (cond
       ;; if it's a directory, don't supply any version defauolt