emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 61046ffbec: Bind gud-go and allow the prefix to enter arguments


From: Lars Ingebrigtsen
Subject: master 61046ffbec: Bind gud-go and allow the prefix to enter arguments
Date: Wed, 11 May 2022 08:27:08 -0400 (EDT)

branch: master
commit 61046ffbec0d819856a04d7aa72e32e5cc402838
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Bind gud-go and allow the prefix to enter arguments
    
    * lisp/progmodes/gdb-mi.el (gdb): Bind gud-go to `C-c C-v' and
    allow a prefix to enter arguments (bug#10106).
---
 etc/NEWS                 |  5 +++++
 lisp/progmodes/gdb-mi.el | 14 +++++++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 595e477e2f..9e985de0b3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -786,6 +786,11 @@ so automatically.
 
 * Changes in Specialized Modes and Packages in Emacs 29.1
 
+---
+*** 'gud-go' is now bound to 'C-c C-v'.
+If given a prefix, it will query the user for an argument to use for
+the run/continue command.
+
 ** Customize
 
 ---
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 3b9e1231ab..06746af761 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -955,12 +955,16 @@ detailed description of this mode.
                          (forward-char 2)
                          (gud-call "-exec-until *%a" arg)))
           "\C-u" "Continue to current line or address.")
-  ;; TODO Why arg here?
   (gud-def
-   gud-go (gud-call (if gdb-active-process
-                        (gdb-gud-context-command "-exec-continue")
-                      "-exec-run") arg)
-   nil "Start or continue execution.")
+   gud-go (progn
+            (when arg
+              (gud-call (concat "-exec-arguments "
+                                (read-string "Arguments to exec-run: "))))
+            (gud-call
+             (if gdb-active-process
+                 (gdb-gud-context-command "-exec-continue")
+               "-exec-run")))
+   "C-v" "Start or continue execution.  Use a prefix to specify arguments.")
 
   ;; For debugging Emacs only.
   (gud-def gud-pp



reply via email to

[Prev in Thread] Current Thread [Next in Thread]