bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Thien-Thi Nguyen
Subject: bug#26309: 24.4; vc-git-register doesn't run interactively
Date: Fri, 31 Mar 2017 14:12:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

() Dmitry Gutov <address@hidden>
() 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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]