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

From: Juri Linkov <[email-masked]>
Date: Tue, 20 Jul 2021 00:53:18 +0300

>> RET can repeat only the last command (afaik). If instead I want to run, in order:
>> 
>> 1. continue
>> 2. next
>> 3. next
>> 4. stepi
>> 
>> then without this patch, I would need to press
>> 
>> 1. C-x C-a C-r
>> 2. C-x C-a C-n
>> 3. C-x C-a C-n
>> 4. C-x C-a C-i
>> 
>> if using M-x gdb.
>
> I would instead use M-p (one or more times), then RET.  Isn't it
> better, especially since it works when using GDB's own CLI prompt?
>
> Or did you mean you want to invoke these commands in the program
> source buffer, not in the GUD interaction buffer?  But in that case,
> how do I exit the repeat-mode, to be able to edit the sources?

'repeat-mode' provides several ways to exit it:

1. type a non-repeatable key (like a non-isearch key exits isearch-mode);
2. customize repeat-exit-key e.g. to RET (then RET exits like in isearch-mode);
3. customize repeat-exit-timeout to exit after a timeout.