       (define-key menu [layout] (cons "Window Layout" submenu)))
 
     (define-key map [menu-bar debugger layout initial]
-      '(menu-item "Initial Debugger Layout" rdebug-restore-windows))
+      (rdebug-menu-item common-map
+                        "Initial Debugger Layout" 'rdebug-restore-windows))
 
     (define-key map [menu-bar debugger layout line1] '(menu-item "--"))
 
     (define-key map [menu-bar debugger layout debugger]
-      '(menu-item "Current Debugger Layout"
-                  rdebug-display-debugger-window-configuration
-                  :button
-                  (:radio
-                   . (eq rdebug-window-configuration-state 'debugger))))
+      (rdebug-menu-item common-map "Current Debugger Layout"
+                        'rdebug-display-debugger-window-configuration
+                        :button
+                        '(:radio
+                          . (eq rdebug-window-configuration-state 'debugger))))
 
     (define-key map [menu-bar debugger layout original]
-      '(menu-item "Original Layout"
-                  rdebug-display-original-window-configuration
-                  :button
-                  (:radio
-                   . (eq rdebug-window-configuration-state 'original))))
+      (rdebug-menu-item common-map "Original Layout"
+                        'rdebug-display-original-window-configuration
+                        :button
+                        '(:radio
+                          . (eq rdebug-window-configuration-state 'original))))
 
     ;; --------------------
     ;; The "View" submeny.

      (define-key menu [view] (cons "View" submenu)))

    (define-key map [menu-bar debugger view output]
      '(menu-item "Output" rdebug-display-output-buffer))

    (define-key map [menu-bar debugger view watch]
      '(menu-item "Watch" rdebug-display-watch-buffer))

    (define-key map [menu-bar debugger view stack]
      '(menu-item "Stack trace" rdebug-display-stack-buffer))

    (define-key map [menu-bar debugger view shell]
      '(menu-item "Debugger Shell" rdebug-display-cmd-buffer))

    (define-key map [menu-bar debugger view variables]
      '(menu-item "Variables" rdebug-display-variables-buffer))

    (define-key map [menu-bar debugger view breakpoints]
      '(menu-item "Breakpoints" rdebug-display-breakpoints-buffer))
    menu))



       (lookup-key (current-local-map) "\C-c")
       t)

      (rdebug-populate-common-keys (current-local-map))
      (rdebug-populate-debugger-menu (current-local-map))

      (setq comint-prompt-regexp "^(rdb:-) ")
      (setq paragraph-start comint-prompt-regexp)
