jman <
mu-di...@city17.xyz> writes:
>> AFAICS, define-key now says it's a legacy function and one should use
>> keymap-set instead in its docstring. But it's not obsolete, and
>> infact keymap-set just calls define-key. So we can be confident it
>> won't disappear within the next decade.
>
> I see. Then I had another understanding about what is meant with
> "legacy" (as the title of my thread implied). So, if define-key is
> not deprecated, what is then the meaning of "legacy" in this case. Why
> did they introduce another way of setting keybindings if - as it is
> customary for emacs - the old way will not be deprecated?
The new set of commands directly work with the keybinding syntax that's
also used in the docs. With the "legacy" version, you had to slap a
(kbd ...) around the bindings or use one of the other syntaxes (string
like "\C-xl" or vector [?\C-x ?l] which both mean the same as the new
"C-x l" or (kbd "C-x l") previously). So I guess, the new set of
commands is simpler from a user perspective.
Bye,
Tassilo