From 80296236a06f41036b341622c5afe2cca4ec58b0 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Fri, 2 May 2008 03:47:14 +0000 Subject: [PATCH] (vc-register): Change argument order so that the prefix argument is assigned correctly. (vc-next-action, vc-dir-register): Update for the above change. --- lisp/ChangeLog | 10 ++++++++-- lisp/vc.el | 24 +++++++++++------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6bdf90308a5..8b7d111d1cf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-05-02 Dan Nicolaescu + + * vc.el (vc-register): Change argument order so that the prefix + argument is assigned correctly. + (vc-next-action, vc-dir-register): Update for the above change. + 2008-05-01 Juri Linkov * replace.el (occur-read-primary-args): Set default to the car of @@ -25,8 +31,8 @@ * vc.el (vc-default-dired-state): Change needs-patch state to needs-update, since the name now shows up in dir-status listings and was somewhat misleading. - * vc.el (vc-cvs-delete-file) Don't do a "cvs commit" immediately after - removing the file. + * vc-cvs.el (vc-cvs-delete-file) Don't do a "cvs commit" + immediately after removing the file. * vc.el (vc-next-action): More informative message when a fileset is in a mixed state. diff --git a/lisp/vc.el b/lisp/vc.el index 8e3521b9e45..82d59c0f84d 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -652,6 +652,10 @@ ;; - vc-dir-next-line should not print an "end of buffer" message when ;; invoked with the cursor on the last file. ;; +;; - add commands to move to the prev/next directory in vc-dir. +;; +;; - document vc-dir in the manual. +;; ;; - vc-diff, vc-annotate, etc. need to deal better with unregistered ;; files. Now that unregistered and ignored files are shown in ;; vc-dired/vc-dir, it is possible that these commands are called @@ -670,9 +674,9 @@ ;; Those logs should likely use a local variable to hardware the VC they ;; are supposed to work with. ;; -;; More issues here: -;; http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg00664.html - +;; - backends that care about vc-stay-local should try to take it into +;; account for vc-dir. Is this likely to be useful??? +;; ;;; Code: (require 'vc-hooks) @@ -1652,7 +1656,7 @@ merge in the changes into your working copy." ;; Files aren't registered ((or (eq state 'unregistered) (eq state 'ignored)) - (mapc 'vc-register files)) + (mapc (lambda (arg) (vc-register nil arg)) files)) ;; Files are up-to-date, or need a merge and user specified a revision ((or (eq state 'up-to-date) (and verbose (eq state 'needs-update))) (cond @@ -1795,7 +1799,7 @@ merge in the changes into your working copy." (vc-call-backend backend 'create-repo)) ;;;###autoload -(defun vc-register (&optional fname set-revision comment) +(defun vc-register (&optional set-revision fname comment) "Register into a version control system. If FNAME is given register that file, otherwise register the current file. With prefix argument SET-REVISION, allow user to specify initial revision @@ -2971,9 +2975,6 @@ specific headers." (define-key map "=" 'vc-diff) ;; C-x v = (define-key map "a" 'vc-dir-register) (define-key map "+" 'vc-update) ;; C-x v + - - ;;XXX: Maybe use something else here, so we can use 'U' for unmark - ;;all, similar to 'M'.. (define-key map "R" 'vc-revert) ;; u is taken by unmark. ;; Can't be "g" (as in vc map), so "A" for "Annotate". @@ -2986,9 +2987,6 @@ specific headers." (define-key map "x" 'vc-dir-hide-up-to-date) (define-key map "q" 'quit-window) (define-key map "g" 'vc-dir-refresh) - ;; PCL-CVS binds "r" to the delete function, but dann objects to ANY binding - ;; - ;; (define-key map "D" 'vc-dir-delete-file) (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) ;; Does not work unless mouse sets point. Functions like vc-dir-find-file ;; need to find the file from the mouse position, not `point'. @@ -3552,8 +3550,8 @@ that share the same state." "Register the marked files, or the current file if no marks." (interactive) ;; FIXME: Just pass the fileset to vc-register. - (mapc 'vc-register (or (vc-dir-marked-files) - (list (vc-dir-current-file))))) + (mapc (lambda (arg) (vc-register nil arg)) + (or (vc-dir-marked-files) (list (vc-dir-current-file))))) (defun vc-dir-delete-file () "Delete the marked files, or the current file if no marks." -- 2.39.5