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: Johan Bockgård
Subject: Re: How make vc-diff and vc-revert-buffer NOT ask to save files but do it automatically?
Date: Fri, 03 Oct 2003 10:51:29 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (usg-unix-v)

address@hidden (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?

-- 
Johan Bockgård


reply via email to

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