Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to use gud buffer together with io buffer?

32 views
Skip to first unread message

horse_rivers

unread,
Sep 24, 2012, 8:53:01 AM9/24/12
to help-gn...@gnu.org


hi
set-use-separate-io-buffer  is  removed  from emacs  in  my  emacs  release,so I  get no idea  for this
thanks!
 


Doug Lewan

unread,
Sep 24, 2012, 9:59:32 AM9/24/12
to Dmitry Gutov, help-gn...@gnu.org
Dmitry,

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".)

I hope this helps.

,Doug

> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shuberttic...@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shuberttic...@gnu.org] On
> Behalf Of Dmitry Gutov
> Sent: Monday, 2012 September 24 08:02
> To: help-gn...@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
> 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)
>
> --Dmitry
>


Drew Adams

unread,
Sep 24, 2012, 10:22:03 AM9/24/12
to Dmitry Gutov, help-gn...@gnu.org
> How do I do that, short of traversing the keymap structure manually?

`describe-keymap', in help-fns+.el

http://www.emacswiki.org/emacs-en/download/help-fns%2b.el


Dmitry Gutov

unread,
Sep 24, 2012, 10:25:18 AM9/24/12
to Doug Lewan, help-gn...@gnu.org
Ouch!

On 24.09.2012 17:59, Doug Lewan wrote:
> 1. diff-hl-mode-map doesn't seem to be defined.

That was exactly the problem. It's a keymap I have defined, but I should
be using the function argument (map) instead.

Thanks for noticing!

--Dmitry

Dmitry Gutov

unread,
Sep 24, 2012, 4:05:16 PM9/24/12
to Drew Adams, help-gn...@gnu.org
Thanks, but I meant programmatically.
Specifically, I'm going to take all the bindings from my minor mode
keymap and do some stuff with them.

Pascal J. Bourguignon

unread,
Sep 24, 2012, 5:13:43 PM9/24/12
to help-gn...@gnu.org
Dmitry Gutov <dgu...@yandex.ru> 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)

Check
https://gitorious.org/com-informatimago/emacs/blobs/blame/256fae6797241e707b3bc79cc7812a82074948a1/pjb-emacs.el#line1750

--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.


0 new messages