Restore specbound keyboard-locals in the correct KBOARD
* doc/lispref/variables.texi (Intro to Buffer-Local): Fix typo
in documentation.
* src/data.c (KBOARD_OBJFWDP): Move to lisp.h.
(kboard_for_bindings): New variable.
(do_symval_forwarding, store_symval_forwarding): Call
kboard_for_bindings rather than retrieving this value directly.
(set_default_internal): New argument WHERE; if valcontents be a
Lisp_Kboard_Objfwd and WHERE be specified, save the binding
there. All callers changed.
* src/eval.c (specpdl_where): Adjust for changes in structure
layout.
(specpdl_kboard): New function.
(do_specbind): Clear let->where.kbd in ordinary SPECPDL_LETs,
and set it to the kboard where the binding will be installed if
binding keyboard forwards.
(specbind, do_one_unbind, specpdl_unrewind): Provide
specpdl_kboard in invocation of set_default_internal.
* src/keyboard.c (delete_kboard): Clean thread specpdls of
references to kboards.
* src/keyboard.h (KBOARD_OBJFWDP): Move from data.c.
* src/lisp.h (union specbinding) <let.where>: Convert into
union of KBOARD and Lisp_Object.
* src/thread.c (all_threads): Export.
* src/thread.h: Adjust correspondingly.
(cherry picked from commit
64cced2c37a9926fe6ff1c6ad9b9540abd47e21c)