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: uzibalqa
Subject: Re: From global-set-key to keymap-global-set
Date: Tue, 04 Jul 2023 17:31:32 +0000

------- Original Message -------
On Wednesday, July 5th, 2023 at 4:44 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > 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)

What does one do to replace

(global-set-key (kbd "C-;") (kbd "C-x C-;"))




reply via email to

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