Michael Olson <[EMAIL PROTECTED]> writes:

>> One way to handle this is to set the default to nil, but have a prompt
>> (also enabled by default) whenever the variable is invoked (or maybe
>> only for a few of the commands) explaining the existence of the other
>> choice, how to set it, and how to disable the prompt. Similar to
>> the disabled commands in standard Emacs.
>
> Good idea.

Thinking about it, I realize that the variable saying whether xgit
will use the index for next commit should probably not be the
configuration option itself, but something based on it. Indeed, it
should be a function like :

(defun xgit-use-index-p ()
  (cond ((eq xgit-use-index 'always) t)
        ((eq xgit-use-index 'never) nil)
        ((eq xgit-use-index 'ask) 
         (y-or-n-p "Do you want git to use the index? ")))

And we can add later some other features like a one-shot setup (M-x
xgit-use-index-next-time-only RET or so, which would set a variable
that xgit-commit would reset, or that would be reset next time HEAD
moves), or whatever we need.

The interactive prompt would probably be good for beginners, but *I*
would probably hate it ;-).

-- 
Matthieu

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to