[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List all bindings in a keymap

From: Pascal J. Bourguignon
Subject: Re: List all bindings in a keymap
Date: Mon, 24 Sep 2012 23:13:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Dmitry Gutov <> writes:

> 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 I
> want, and if I try to use it recursively, it reliably blows up with
> "max-lisp-eval-depth exceeded". Example snippet:
> (defun scan-keymap (map)
>   (map-keymap (lambda (event binding)
>                 (if (consp binding)
>                     (progn (message "cdadr %s" (cdadr binding))
>                            (scan-keymap (cdadr binding)))
>                   (message "%s" binding))) diff-hl-mode-map))
> (require 'js)
> (scan-keymap js-mode-map)


__Pascal Bourguignon__           
A bad day in () is better than a good day in {}.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]