[Top][All Lists]

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

Re: How make vc-diff and vc-revert-buffer NOT ask to save files but do i

From: Christian Seberino
Subject: Re: How make vc-diff and vc-revert-buffer NOT ask to save files but do it automatically?
Date: 30 Sep 2003 17:08:03 -0700


Thanks! With your help I got vc-diff and vc-revert-buffer to NOT ask
me if I want to save buffer because it is now done automatically.

Can I please ask you how to avoid 1 more question in

vc-revert-buffer seems to do a vc-diff command and then asks
a SECOND question something like... "Are you *sure* you want
to discard these changes?"

How hardcode answer to this SECOND question to be yes???

I read the emacs online doc on vc-revert-buffer like you suggested
but it had no clues.  Here it is:

vc-revert-buffer is an interactive autoloaded Lisp function in `vc'.
It is bound to <menu-bar> <tools> <vc> <vc-revert-buffer>.

Revert the current buffer's file to the version it was based on.
This asks for confirmation if the buffer contents are not identical
to that version.  This function does not automatically pick up newer
changes found in the master file; use M-x universal-argument M-x
vc-next-action to do so.

Any help greatly appreciated.


Kevin Rodgers <address@hidden> wrote in message news:<address@hidden>...
> Christian Seberino wrote:
> > I tried to wrap your code into my vc-diff wrapper and got an error 
> > message...
> > 
> >    (defun cs-vc-diff() (interactive)
> >       (let ((unread-command-events '(?y ?e ?s)))
> >          (vc-diff)) ; (call-interactively 'vc-diff)?
> >    )
> > 
> > Here is the error message...
> > 
> > let: Wrong number of arguments: #[(historic &optional not-urgent) 
> > ....etc.
> Why do you refuse to type `C-h f vc-diff'?
> | vc-diff is an interactive compiled Lisp function in `vc'.
> | (vc-diff HISTORIC &optional NOT-URGENT)
> |
> | Display diffs between file versions.
> | Normally this compares the current file and buffer with the most
> | recent checked in version of that file.  This uses no arguments.  With
> | a prefix argument HISTORIC, it reads the file name to use and two
> | version designators specifying which versions to compare.  The
> | optional argument NOT-URGENT non-nil means it is ok to say no to
> | saving the buffer.
> So you probably want to run (vc-diff nil).

reply via email to

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