emacs-devel
[Top][All Lists]
Advanced

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

Re: Clarifying the C-c letter guideline


From: Matt Armstrong
Subject: Re: Clarifying the C-c letter guideline
Date: Sun, 14 Feb 2021 10:15:40 -0800

Philip Kaludercic <philipk@posteo.net> writes:

> Hi,
>
> a few days ago, there was a discussion on help-gnu-emacs[0],
> specifically on this one paragraph from (elisp) Key Binding Conventions:
>
>> • Don’t 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.
>
> There seems to be some uncertainty in how this should be
> interpreted. Does this mean that...
>
> - No package/library/third-party code may ever bind a command or map to
>   C-c LETTER, under any circumstances (in the letter of the law).
>
> - A package/library/third-party code may bind a command or a map to C-c
>   LETTER, if the user is explicitly asked and he or she gives
>   permission (in the spirit of the law).

Hey Philip, I think your first rule is too strict to be unusuable, so
the second interpretation is the reasonable one.

Think of this example from use-package:
https://jwiegley.github.io/use-package/keywords/#bind-keymap-bind-keymap,
which even uses an example C-c LETTER binding in its
documentation. Under your first rule that would be illegal --
use-package would be a "List program" that is binding C-c LETTER
bindings.

Now, you may say that argument is silly because the user has told
use-package to make that binding. That is fine, but at that point you
are arguing for the second interpretation, not the first.



reply via email to

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