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

[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: 6 Oct 2003 15:44:07 -0700

Johan

Thanks.  This was a real gift.  You helped me more than you know.

Chris


bojohan+news@dd.chalmers.se (Johan Bockgård) wrote in message 
news:<yoijsmmawvou.fsf@samwise.dd.chalmers.se>...
> seberino@spawar.navy.mil (Christian Seberino) writes:
> 
> > Indeed the following wrapper for vc-revert-buffer spells out "yes"
> > when it asks the last question: "Discard changes? yes or no".
> >
> > I must still press RETURN to answer the question.
> >
> > Can I please ask you how to add the RETURN to the "yes" that this
> > wrapper spells out? Then it will be done!
> >
> >    (defun cs-vc-revert-buffer() (interactive)
> >       (save-buffer)
> >       (let ((unread-command-events '(?y ?e ?s)))
> >          (vc-revert-buffer)) ; (call-interactively 'vc-revert-buffer)?
> >    )
> 
> Does (unread-command-events '(?y ?e ?s ?\C-m)) work?


reply via email to

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