1. diff-hl-mode-map doesn't seem to be defined.
2. You haven't passed a keymap to (map-keymap) (second arg).
3. According to the info documentation of (map-keymap): "This function is the cleanest way to examine all the bindings in a keymap." (info node "Scanning Keymaps".)
While I'm hardly an expert on keymaps I would bet that that already recurses "in the right way". (That's my guess for "max-lisp-eval-depth exceeded".)
> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shubertticketing....@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing....@gnu.org] On
> Behalf Of Dmitry Gutov
> Sent: Monday, 2012 September 24 08:02
> To: help-gnu-em...@gnu.org
> Subject: List all bindings in a keymap
> Hi all,
> How do I do that, short of traversing the keymap structure manually?
> The doc recommends to use `map-keymap', but it doesn't exactly do what
> want, and if I try to use it recursively, it reliably blows up with
> "max-lisp-eval-depth exceeded". Example snippet: