[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Emacs default key bindings [was: Opening Up More Keymaps Re: Stan
From: |
Drew Adams |
Subject: |
RE: Emacs default key bindings [was: Opening Up More Keymaps Re: Standardizing more key bindings?] |
Date: |
Fri, 2 Oct 2020 15:50:58 -0700 (PDT) |
> > C-x is reserved for emacs internal use.
> > C-c for users.
As I said, both of those statements are wrong.
> According to "(elisp) Key Binding Conventions":
>
> > Sequences consisting of ‘C-c’ followed by a control
> > character or a digit are reserved for major modes.
>
> (not the exceptions listed in the info node)
And? What's your point? `C-c' is _not_ reserved for
users, in general. `C-c <letter>' is reserved for users.
> while C-x is a lot safer for users. It would be very
> unusual for a major mode to rebind "C-x ...",
Why do you think so? There's nothing in the conventions
about `C-x'.
Don't confuse statements about a binding being reserved
for some use with a claim that a binding not listed as
reserved is somehow off limits. Such a claim would be
improper.
Everything that's not stated in the conventions is OK.
(Even things that are stated in the conventions are only
that: conventional.) The conventions exist to help us
not get our feet stepped on, by ourselves or others.
> which is why I bind most of my local functions to that map.
You're free to do so. Nothing wrong with that, whether
you mean as user or as a library writer.
> On the other hand, something like C-c C-... will often be
> shadowed by a major mode [or] minor mode, hence I don't
> bother trying.
`C-c C-<something' is reserved for a major mode. If
you're writing a major mode, you can use it, following
the convention. If you're writing a library and the
library binds `C-c C-<something>' in a map other than
for a major mode then that violates the convention.
As a user you can bind any key to anything, including
binding `C-c C-<something'.
The conventions don't cover user bindings, except to
say that `C-c <letter>' are _reserved_ for users.
A user binding `C-c C-<something' (e.g. globally) might
find a major mode overriding that binding. That's all.