bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11977: 23.2; F5 and revert without confirmation


From: Drew Adams
Subject: bug#11977: 23.2; F5 and revert without confirmation
Date: Wed, 18 Jul 2012 08:51:25 -0700

> This piece of code should really be part of emacs defaults !
> 
> (defun revert-buffer-no-confirm ()
>     "Revert buffer without confirmation."
>     (interactive) (revert-buffer t t))
> (define-key global-map [f5] 'revert-buffer-no-confirm)

+1, at least for adding the definition.

FWIW, that's exactly the code I have in misc-cmds.el.

Wrt binding f5 by default:

Emacs Dev generally avoids binding function keys by default, as it should.  But
they have already created default bindings for some function keys (they should
*not* have, IMHO).

Also, function keys are repeatable keys (just hold one down to repeat it), and
as such they should generally be used for repeatable commands.  We should
generally put commands (such as buffer reverting) that are typically not
repeated on other key sequences, and not waste repeatable keys on them.

But this binding could be made by default on MS Windows perhaps.  On that
platform f5 is revert/update/refresh for applications generally.

(Personally/FWIW, I bind it to f5 on all platforms.)






reply via email to

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