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: Philip Kaludercic
Subject: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
Date: Sat, 13 Feb 2021 17:08:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> Philip Kaludercic wrote:
>
>> (defun foo-bind-to (key)
>>   (global-set-key (kbd key) #'foo-function))
>>
>> even though it is nonsensical, it violates what I consider
>> the literal interpretation (global-set-key is called from
>> a library)
>
> What is a library all of a sudden? A package?

Oops, yes, I meant a package.

> There is nothing wrong with having Elisp help you assign keys.
>
> On the contrary, that's how it is done :)

My point was if a package provides function as the one above, you'd be
able to write

        (foo-bind-to "C-c a")

instead of

        (global-set-key (kbd "C-c a") #'foo-function)

which probably isn't worth it.

-- 
        Philip K.

Attachment: signature.asc
Description: PGP signature


reply via email to

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