* key mapping: adding automatic confirmations to command
@ 2005-06-21 20:25 bturnip
2005-06-21 22:21 ` Guido Van Hoecke
0 siblings, 1 reply; 2+ messages in thread
From: bturnip @ 2005-06-21 20:25 UTC (permalink / raw)
Hola, Emacs folks!
I have mapped the revert-buffer function to F10, like so:
(global-set-key [f10] 'revert-buffer)
What I would like to add is automatic confirmation, so that I don't
have to answer (y or n) each time.
How can I do that?
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: key mapping: adding automatic confirmations to command
2005-06-21 20:25 key mapping: adding automatic confirmations to command bturnip
@ 2005-06-21 22:21 ` Guido Van Hoecke
0 siblings, 0 replies; 2+ messages in thread
From: Guido Van Hoecke @ 2005-06-21 22:21 UTC (permalink / raw)
bturnip wrote:
> Hola, Emacs folks!
>
> I have mapped the revert-buffer function to F10, like so:
> (global-set-key [f10] 'revert-buffer)
>
> What I would like to add is automatic confirmation, so that I don't
> have to answer (y or n) each time.
>
> How can I do that?
>
> Thanks!
>
You could try something like this:
(defun my-revert-buffer ()
"does a revert buffer without asking for confirmation"
(interactive)
(revert-buffer t t))
(global-set-key [(control shift f10)] 'my-revert-buffer)
Seems rather dangerous, no confirmation at all!
Guido
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-21 22:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-21 20:25 key mapping: adding automatic confirmations to command bturnip
2005-06-21 22:21 ` Guido Van Hoecke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).