From: Dan Nicolaescu Date: Wed, 9 Jan 2008 07:21:08 +0000 (+0000) Subject: (vc-deduce-fileset): Return the currently selected file if X-Git-Tag: emacs-pretest-23.0.90~8621 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e11c1d937fc41f228d261576ccdcc76308e1118a;p=emacs.git (vc-deduce-fileset): Return the currently selected file if no files are selected when using vc-status. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd955494b77..e72275e9010 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,19 +1,24 @@ +2008-01-09 Dan Nicolaescu + + * vc.el (vc-deduce-fileset): Return the currently selected file if + no files are selected when using vc-status. + 2008-01-09 Michael Kifer * 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 * vc.el (vc-status-headers): Rename from diff --git a/lisp/vc.el b/lisp/vc.el index 6e170ab1464..5966cfb7a7e 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1276,9 +1276,12 @@ Otherwise, throw an error." (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