   (define-key map "f" 'gud-finish)
   (define-key map "n" 'gud-next)
   (define-key map "p" 'gud-print)
-  (define-key map "q" 'gud-quit)
+  (define-key map "q" 'rdebug-quit)
   (define-key map "r" 'gud-run)
   (define-key map "s" 'gud-step)
   ;(define-key map "t" 'gud-tbreak)
-)
+  ;; Returns the menu.
+  (if no-menu
+      nil
+    (rdebug-populate-common-keys map)
+    (rdebug-populate-debugger-menu map)))
+
 
 (defun rdebug-display-breakpoints-buffer ()
   "Display the rdebug breakpoints buffer."

;; -- breakpoints

(defvar rdebug-breakpoints-mode-map
  (let ((map (make-sparse-keymap))
	(menu (make-sparse-keymap "Breakpoints")))
    (define-key menu [quit] '("Quit"   . rdebug-delete-frame-or-window))
    (define-key menu [goto] '("Goto"   . rdebug-goto-breakpoint))
    (define-key menu [delete] '("Delete" . rdebug-delete-breakpoint))
    (define-key menu [toggle] '("Toggle" . rdebug-toggle-breakpoint))
    (define-key map [mouse-2] 'rdebug-goto-breakpoint-mouse)
    (define-key map " " 'rdebug-toggle-breakpoint)
    (define-key map [? ] 'rdebug-toggle-breakpoint)
    (define-key map [(control m)] 'rdebug-goto-breakpoint)
    (define-key map [?d] 'rdebug-delete-breakpoint)
    (rdebug-secondary-buffer-populate-map map menu)
    map)
  "Keymap to navigate/set/enable rdebug breakpoints.")


    (define-key map "d" 'rdebug-display-delete)
    (define-key map "e" 'rdebug-display-edit)
    (define-key map "\r" 'rdebug-display-edit)
    (rdebug-populate-secondary-buffer-map map)
    map))

(defun rdebug-display-mode ()
