[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13777: [patch] Add toolbars for Edebug and debugger-mode
From: |
Xue Fuqiao |
Subject: |
bug#13777: [patch] Add toolbars for Edebug and debugger-mode |
Date: |
Wed, 8 May 2013 17:39:55 +0800 |
On Wed, May 8, 2013 at 3:50 PM, Glenn Morris <rgm@gnu.org> wrote:
>> + (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).
Agreed.
>> + (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?
There are some candidates, such as `backtrace', `cancel-debug-on-entry'.
But I haven't found suitable icons for them yet.
> It looks a bit silly with just 2 items... Maybe keep some of the
> standard ones?
Sounds like a good compromise.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/