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
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to