Subject: Re: bug#26309: 24.4; vc-git-register doesn't run interactively

From: Thien-Thi Nguyen <[email-masked]>
Date: Fri, 31 Mar 2017 14:12:06 +0200

() Dmitry Gutov <[email-masked]>
() Thu, 30 Mar 2017 19:31:35 +0300

   Creating a command that calls vc-git-register should be trivial.

Yes.  For example, here's what i bind to ‘C-x v i’:

(defun more-vc-register-dwim (&optional fname)
  "Like `vc-register' but if FNAME is already under Git, do a \"git add\"."
  (interactive)
  (unless fname (setq fname buffer-file-name))
  (if (and (eq 'Git (vc-backend fname))
            (vc-registered fname))
      (vc-git-command nil 0 fname "add")
    (call-interactively 'vc-register)))

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (query)
   (pcase (context query)
     (`(technical ,ml) (correctp ml))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502