- Special major modes used for read-only text should usually redefine
mouse-2 and <RET> to trace some sort of reference in the text.
Modes such as Dired, Info, Compilation, and Occur redefine it in this
way.
In addition, they should mark the text as a kind of “link” so that
mouse-1 will follow it also. See Links and Mouse-1.
- Please do not define C-c letter as a key in Lisp programs.
Sequences consisting of C-c and a letter (either upper or lower
case) are reserved for users; they are the only sequences
reserved for users, so do not block them.
Changing all the Emacs major modes to respect this convention was a
lot of work; abandoning this convention would make that work go to
waste, and inconvenience users. Please comply with it.
- Function keys <F5> through <F9> without modifier keys are
also reserved for users to define.
- Applications should not bind mouse events based on button 1 with the
shift key held down. These events include S-mouse-1,
M-S-mouse-1, C-S-mouse-1, and so on. They are reserved for
users.
- Sequences consisting of C-c followed by a control character or a
digit are reserved for major modes.
- Sequences consisting of C-c followed by {, },
<, >, : or ; are also reserved for major modes.
- Sequences consisting of C-c followed by any other punctuation
character are allocated for minor modes. Using them in a major mode is
not absolutely prohibited, but if you do that, the major mode binding
may be shadowed from time to time by minor modes.
- Do not bind C-h following any prefix character (including
C-c). If you don't bind C-h, it is automatically available
as a help character for listing the subcommands of the prefix character.
- Do not bind a key sequence ending in <ESC> except following
another <ESC>. (That is, it is OK to bind a sequence ending in
<ESC> <ESC>.)
The reason for this rule is that a non-prefix binding for <ESC> in
any context prevents recognition of escape sequences as function keys in
that context.
- Anything which acts like a temporary mode or state which the user can
enter and leave should define <ESC> <ESC> or
<ESC> <ESC> <ESC> as a way to escape.
For a state which accepts ordinary Emacs commands, or more generally any
kind of state in which <ESC> followed by a function key or arrow key
is potentially meaningful, then you must not define <ESC>
<ESC>, since that would preclude recognizing an escape sequence
after <ESC>. In these states, you should define <ESC>
<ESC> <ESC> as the way to escape. Otherwise, define
<ESC> <ESC> instead.