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

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

Re: define-key upon common-lisp-mode and inferior-lisp-mode


From: Alessandro Bertulli
Subject: Re: define-key upon common-lisp-mode and inferior-lisp-mode
Date: Wed, 31 Aug 2022 14:04:50 +0200
User-agent: mu4e 1.8.9; emacs 29.0.50

Eli Zaretskii <eliz@gnu.org> writes:

> Use local-set-key instead.
>
>> On the other modes I have been using 
>> 
>> (define-key emacs-lisp-mode-map (kbd "H-e") #'eval-last-sexp)
>> 
>> The last seems more standard for many modes.
>
> I can only show you the better solutions, I cannot force you use them.

The documentation says local-set-key is legacy, and should be replaced
by keymap-local-set.

But aside from that, I only use define-key, and it works pretty good.
What are the advantages of using keymap-local-set? When using define-key
with the mode specific map, I'm not polluting other keymaps. So why the
need for a local function?

Alessandro



reply via email to

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