From: Manuel Giraud Date: Sat, 25 Sep 2021 01:38:43 +0000 (+0200) Subject: Make 'C-u C-x v v' handle unregistered files. X-Git-Tag: emacs-28.0.90~669 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f6f87917fc5eb151aff0facc390983012644a681;p=emacs.git Make 'C-u C-x v v' handle unregistered files. * lisp/vc/vc.el (vc-next-action): Make 'C-u C-x v v' handle unregistered files (bug#50602). --- diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 87679691637..7d3b0f56f60 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1216,7 +1216,11 @@ For old-style locking-based version control systems, like RCS: ((eq state 'ignored) (error "Fileset files are ignored by the version-control system")) ((or (null state) (eq state 'unregistered)) - (vc-register vc-fileset)) + (cond (verbose + (let ((backend (vc-read-backend "Backend to register to: "))) + (vc-register (cons backend (cdr vc-fileset))))) + (t + (vc-register vc-fileset)))) ;; 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