Yoshiki Hayashi <yoshiki(a)xemacs.org> writes:
> Anyway, 9.5 seconds is a long time, especially compared to
1.87.
> I think this calls for a more intelligent non-regexp-based
> solution.
I thought the same but describe-bindings-internal inserts all keys
and its commands. Unfortunately, it is a built-in function. Hmm.
I think I need function to return alist of key and command.
You can:
* Rewrite describe-bindings-internal to only return a data structure
with necessary information (e.g. the alist you mention), and move
the majority of buffer-generation code to describe-bindings itself.
The possible downside of this is might make the whole thing even
slower -- a cure worse than the disease.
* Provide a hook that describe-bindings calls when it does interesting
things. The hook can attach extents, or remember positions in a
list, or do whatever else it pleases. This is less work, but it
creates an interdependence between the Lisp hook and the C code that
might be hard to track and to maintain.