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

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

Re: global-set-key with function taking arguments


From: Corwin Brust
Subject: Re: global-set-key with function taking arguments
Date: Sun, 1 Nov 2020 17:38:55 -0600

On Sun, Nov 1, 2020 at 8:56 AM Emanuel Berg via Users list for the GNU
Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Christopher Dimech wrote:
>
> > My only complaint was that you would not get a description when
> > using in a key binding. But now I know that one can put
> > a description.
>
> Yeah, but they are not intended to be used in exactly the same way.
> Please read: C-h f lambda RET

Rebinding is something specific that is harder if one uses binds a
lambda to a key.

This example from the top of the Elisp Manual section 22.12 would be
difficult if `kill-line' has been implemented with a lambda:

  (define-key my-mode-map [remap kill-line] 'my-kill-line)

In addition to (info "(elisp)Controlling-Active-Maps") see
`substitute-key-definition' in (info "(elisp)Changing Key Bindings")
for other problematic cases.

>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>

Regards,
Corwin



reply via email to

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