                               (buffer-substring b e))
             (add-text-properties b e
                                  (list 'mouse-face 'highlight
-                                       'keymap rdebug--breakpoints-map))
+                                       'keymap rdebug-breakpoints-mode-map))
             (add-text-properties
              (+ b (match-beginning 1)) (+ b (match-end 1))
              (list 'face font-lock-constant-face

\\{rdebug-locals-mode-map}"
  ; (kill-all-local-variables)
  (interactive "")
  (setq major-mode 'rdebug-locals-mode)
  (setq mode-name "RDEBUG Locals")
  (setq buffer-read-only t)

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

(defun rdebug-delete-frame-or-window ()
  "Delete frame if there is only one window.  Otherwise delete the window."
  (interactive)
  (if (one-window-p) (delete-frame)
    (delete-window)))

(defun rdebug-breakpoints-mode ()
  "Major mode for rdebug breakpoints.

\\{rdebug-breakpoints-mode-map}"
  (kill-all-local-variables)
  (setq major-mode 'rdebug-breakpoints-mode)
  (setq mode-name "RDEBUG Breakpoints")
  (use-local-map rdebug-breakpoints-mode-map)
  (setq buffer-read-only t)
  (run-mode-hooks 'rdebug-breakpoints-mode-hook)
  ;(if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
  ;    'gdb-invalidate-breakpoints
  ;  'gdbmi-invalidate-breakpoints)
)

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