changeset 87679:caf9a76fd5a3

(vc-deduce-fileset): Return the currently selected file if no files are selected when using vc-status.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 09 Jan 2008 07:21:08 +0000
parents ae3fe9150b36
children 30126318d2b0
files lisp/ChangeLog lisp/vc.el
diffstat 2 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jan 09 06:16:07 2008 +0000
+++ b/lisp/ChangeLog	Wed Jan 09 07:21:08 2008 +0000
@@ -1,19 +1,24 @@
+2008-01-09  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* vc.el (vc-deduce-fileset): Return the currently selected file if
+	no files are selected when using vc-status.
+
 2008-01-09  Michael Kifer  <kifer@cs.stonybrook.edu>
 
 	* ediff*.el: commented out declare-function. "make bootstrap"
 	stops with an error and emacs does not compile with those things in.
 	Besides, declare-function is not defined in XEmacs.
-	
+
 	* ediff-util (eqiff-quit): autoraise minibuffer.
-	
+
 	* ediff-diff (ediff-convert-fine-diffs-to-overlays): make it a defin
-	
+
 	* viper*.el: commented out declare-function -- not defined in XEmacs.
-	
+
 	* viper-ex.el (viper-info-on-file): take care of indiret buffers.
-	
+
 	* viper.el (viper-set-hooks, set-cursor-color): set viper-vi-state-cursor-color.
-	
+
 2008-01-09  Tom Tromey  <tromey@redhat.com>
 
 	* vc.el (vc-status-headers): Rename from
--- a/lisp/vc.el	Wed Jan 09 06:16:07 2008 +0000
+++ b/lisp/vc.el	Wed Jan 09 07:21:08 2008 +0000
@@ -1276,9 +1276,12 @@
                (unless (eq (vc-backend f) firstbackend)
                  (error "All members of a fileset must be under the same version-control system."))))
 	   marked))
-	((eq major-mode 'vc-status-mode)
-	 (vc-status-marked-files))
-	((vc-backend buffer-file-name)
+        ((eq major-mode 'vc-status-mode)
+         (let ((marked (vc-status-marked-files)))
+           (if marked
+               marked
+             (list (vc-status-current-file)))))
+ 	((vc-backend buffer-file-name)
 	 (list buffer-file-name))
 	((and vc-parent-buffer (or (buffer-file-name vc-parent-buffer)
 				   (with-current-buffer vc-parent-buffer