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

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

Re: PROPOSAL: Repurpose one key and reserve it for third-party packages


From: Gregory Heytings
Subject: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
Date: Fri, 12 Feb 2021 21:48:12 +0000



My reading of the guideline on "C-c LETTER" is that a major/minor mode shouldn't bind C-c LETTER to a command, so that it overshadows whatever is bound globally to C-c LETTER. But a system like what I propose just generates to configuration *for* the user, in a user file in which case the guideline doesn't apply. That's what I mean by avoiding the need for an extra key-space.


I'm not sure your interpetation of that guideline ("Don't define 'C-c LETTER' as a key in Lisp programs") is correct, but now at least I see what you mean: you're more or less cheating the guideline by generating a configuration file, after asking the user if they're okay with that, instead of binding the key directly in the package depending on the value of a configuration variable. To me what you propose looks pretty close to using customize to set a foobar-set-global-binding variable that would be used in a call to global-set-key.

And that doesn't solve the problem that 26 letter keys is a small number. Yes, you can also use capital letters, and yes, you can put keymaps on these 26 letters instead of single commands. IMO, that can't work as a long-term solution; if it were, it would already be used, and the fact is that it isn't, and that third-party packages prefer to use, or recommend to use, keys that are not yet bound by Emacs.


Of course, if some way could be found to reserve a prefix for third-party packages,


Again: this, to reserve prefix key(s) for third-party packages, and only this, is what the proposal is about.



reply via email to

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