   "Detects breakpoint lines and sets up mouse navigation."
   (with-current-buffer buf
     (let ((inhibit-read-only t))
-      (setq mode-name "RDEBUG Breakpoints")
+      (rdebug-breakpoints-mode)
       (goto-char (point-min))
       (while (not (eobp))
         (let ((b (line-beginning-position)) (e (line-end-position)))

    map)
  "Keymap to navigate/set/enable rdebug breakpoints.")

(defconst rdebug--breakpoint-regexp
  "^\\ +\\([0-9]+\\) +at +\\(.+\\):\\([0-9]+\\)$"
  "Regexp to recognize breakpoint lines in rdebug breakpoint buffers.")


;; -- 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" . gdb-toggle-breakpoint))
    (define-key map [mouse-2] 'rdebug-goto-breakpoint-mouse)
    ; (define-key map [? ] 'rdebug-toggle-breakpoint)
    (define-key map [(control m)] 'rdebug-goto-breakpoint)
