Subject: bug#49632: [PATCH] Ensure that M-x gdb populates gud-repeat-map

From: Brian Leung <[email-masked]>
Date: Mon, 19 Jul 2021 05:37:25 +0200 (CEST)

See attached.

-- 
Mailfence.com
Private and secure email
>From c288290de6185e3b23f295b32843c2fc7d4a7049 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Sun, 18 Jul 2021 20:14:50 -0700
Subject: [PATCH] Ensure that M-x gdb populates gud-repeat-map

* lisp/progmodes/gdb-mi.el (gdb): Populate gud-repeat-map. This is
copied from the gud-gdb command.
---
 lisp/progmodes/gdb-mi.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index aa3365278c..d6a2bce334 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -979,6 +979,17 @@ gdb
   (define-key gud-minor-mode-map [left-margin C-mouse-3]
     'gdb-mouse-jump)
 
+  (pcase-dolist (`(,key . ,cmd) '(("n" . gud-next)
+                                  ("s" . gud-step)
+                                  ("i" . gud-stepi)
+                                  ("c" . gud-cont)
+                                  ("l" . gud-refresh)
+                                  ("f" . gud-finish)
+                                  ("<" . gud-up)
+                                  (">" . gud-down)))
+    (define-key gud-repeat-map key cmd)
+    (put cmd 'repeat-map 'gud-repeat-map))
+
   (setq-local gud-gdb-completion-function 'gud-gdbmi-completions)
 
   (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
-- 
2.32.0