Subject: bug#13777: [patch] Add toolbars for Edebug and debugger-mode

From: Glenn Morris <[email-masked]>
Date: Wed, 08 May 2013 03:50:35 -0400

Thanks for the patches.

Xue Fuqiao wrote:

> *** trunk/lisp/emacs-lisp/edebug.el.orig 2013-02-03
> 09:46:50.383143000 +0800
> --- trunk/lisp/emacs-lisp/edebug.el 2013-02-21
> 18:10:30.220096536 +0800 *************** be installed in
> `emacs-lisp-mode-map'.") *** 3727,3732 ****
> --- 3727,3745 ----

(These patches seem mangled somehow?)

> + (defvar edebug-tool-bar-map
> +   (let ((map (make-sparse-keymap)))
> +     (dolist (x '((edebug-set-breakpoint . "gud/break")
> + 		 (edebug-unset-breakpoint . "gud/remove")
> + 		 (edebug-go-mode . "gud/go")
> + 		 (edebug-stop . "gud/stop")
> + 		 (edebug-continue-mode . "gud/cont")
> + 		 (edebug-next-mode . "gud/next")
> + 		 (edebug-step-mode . "gud/step"))
> + 	       map)
> +       (tool-bar-local-item-from-menu
> +        (car x) (cdr x) map edebug-mode-map))))

Looks alright but:

i) I think this needs to be moved after the easy-menu-define call.

ii) You need to find a way to restore the normal tool-bar after edebug
exits (for whatever reason).

> + (defvar debugger-tool-bar-map
> +   (let ((map (make-sparse-keymap)))
> +     (dolist (x '((debugger-continue . "gud/cont")
> + 		 (debugger-step-through . "gud/step"))
> + 	       map)
> +       (tool-bar-local-item-from-menu
> +        (car x) (cdr x) map debugger-mode-map))))

Looks ok, but it's a very sparse tool-bar. Is there nothing more that
can go in it? It looks a bit silly with just 2 items...
Maybe keep some of the standard ones?