From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (=?iso-8859-1?q?Johan_Bockg=E5rd?=) Newsgroups: gmane.emacs.help 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 Organization: Chalmers University of Technology, Sweden Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3F70C451.6040603@yahoo.com> <3F748888.7060101@yahoo.com> <3F7AEB83.4050500@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1065171720 3408 80.91.224.253 (3 Oct 2003 09:02:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2003 09:02:00 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 03 11:01:56 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A5Loy-0002jv-00 for ; Fri, 03 Oct 2003 11:01:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A5Lox-0004SC-JW for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Oct 2003 05:01:55 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.algonet.se!'newsfeed1.telenordia.se'!algonet!newsfeed.sunet.se!news01.sunet.se!dd.chalmers.se!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: samwise.dd.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (usg-unix-v) Cancel-Lock: sha1:bbHbmnn3qxeO/KvQL+ppPTmEizw= Original-Xref: shelby.stanford.edu gnu.emacs.help:117044 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12972 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12972 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? -- Johan Bockgård