From 219ffde846304915e173bd99833e30d012a58b82 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 12 Oct 1998 23:55:10 +0000 Subject: [PATCH] Add Debug and Help menu items. --- Tools/idle/Bindings.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Tools/idle/Bindings.py b/Tools/idle/Bindings.py index 4f1ddacec50..4f833c67b3d 100644 --- a/Tools/idle/Bindings.py +++ b/Tools/idle/Bindings.py @@ -100,6 +100,17 @@ emacs_bindings = [ "<>", "", ""), ("edit", "Uncomment region", "Alt-4", "<>", "", ""), + + # Debug menu + + ("debug", "Go to line from traceback", None, "<>"), + ("debug", "Open stack viewer", None, "<>"), + + # Help menu + + ("help", "Help...", None, "<>"), + ("help", None, None), + ("help", "About IDLE...", None, "<>"), # Not in any menu @@ -134,11 +145,12 @@ def apply_bindings(text, bindings=default_bindings): def fill_menus(text, dict, bindings=default_bindings): # Fill the menus for the given text widget. The dict argument is # a dictionary containing the menus, keyed by their lowercased name. + # Menus that are absent or None are ignored. for args in bindings: menu, label, accelerator = args[:3] if not menu: continue - menu = dict[menu] + menu = dict.get(menu) if not menu: continue if accelerator is None: