From the NEWS
file:
* Lisp Changes in Emacs 24.3
...
*** `kbd' is now a function rather than a macro.
That means that in earlier Emacs versions, the argument to kbd
must be literally present in the call, as opposed to the use of a variable in your example.
Alternatively, you can use eval
and backquotes to insert the value:
(eval `(kbd ,keybind))