all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.