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

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

Re: From global-set-key to keymap-global-set


From: Eli Zaretskii
Subject: Re: From global-set-key to keymap-global-set
Date: Tue, 04 Jul 2023 19:44:01 +0300

> Date: Tue, 04 Jul 2023 16:35:34 +0000
> From: uzibalqa <uzibalqa@proton.me>
> 
> 
> Have been using "global-set-key" in this way
> 
> (global-set-key (kbd "H-e") #'eval-expression)
> 
> The documentation states that "global-set-key" is a legacy function; 
> instructing
> people that the recommended function to use is "keymap-global-set".
> 
> The problem is that one cannot use "keymap-global-set" in the same way
> 
> (keymap-global-set (kbd "H-e") #'eval-expression)

Are you reading the documentation of the function before you start
using it?  If not, I highly recommend to do so.

In this particular case, you need to get rid of 'kbd' -- this was the
main reason for providing these new replacements.

  (keymap-global-set "H-e" #'eval-expression)



reply via email to

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