From: Wang Diancheng <dianchengwang@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 64590@debbugs.gnu.org
Subject: bug#64590: Patch: fix gud-go in gdb-mi.el
Date: Fri, 14 Jul 2023 11:06:32 +0800 [thread overview]
Message-ID: <CADmgXh7BxXufdtvT8UQzfn4V9ReVpkvxfV9VeVhnsrfZ3yn55g@mail.gmail.com> (raw)
In-Reply-To: <834jm85gsi.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]
Eli Zaretskii <eliz@gnu.org> 于2023年7月13日周四 16:58写道:
>
> > From: Wang Diancheng <dianchengwang@gmail.com>
> > Date: Thu, 13 Jul 2023 12:40:58 +0800
> >
> > document of gud-go says "Start or continue execution. Use a prefix to
> > specify arguments." but it always prompts for program arguments
> > regardless of whether "C-u" is pressed because arg is numeric prefix
> > here.
>
> Right, gud-def specifies '(interactive "p")'.
>
> > The attachment is a patch to change gud-go just prompts if
> > prefix is not 1.
>
> This will have the subtlety that "C-u 1 C-v" will fail to ask for
> program arguments. Shouldn't we instead look at current-prefix-arg?
>
Thanks.
Yes, I think it's a good idea. the patch is updated as that.
> Thanks.
[-- Attachment #2: gud-go-v2.patch --]
[-- Type: text/x-patch, Size: 493 bytes --]
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 199be3318a1..a1091de43e9 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -987,7 +987,7 @@ gdb
"\C-u" "Continue to current line or address.")
(gud-def
gud-go (progn
- (when arg
+ (when (and current-prefix-arg arg)
(gud-call (concat "-exec-arguments "
(read-string "Arguments to exec-run: "))))
(gud-call
next prev parent reply other threads:[~2023-07-14 3:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 4:40 bug#64590: Patch: fix gud-go in gdb-mi.el Wang Diancheng
2023-07-13 8:58 ` Eli Zaretskii
2023-07-14 3:06 ` Wang Diancheng [this message]
2023-07-15 8:42 ` Eli Zaretskii
2023-07-17 9:07 ` Wang Diancheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADmgXh7BxXufdtvT8UQzfn4V9ReVpkvxfV9VeVhnsrfZ3yn55g@mail.gmail.com \
--to=dianchengwang@gmail.com \
--cc=64590@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).