From: Juri Linkov <juri@linkov.net>
To: Brian Leung <leungbk@mailfence.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 49632@debbugs.gnu.org
Subject: bug#49632: [PATCH] Ensure that M-x gdb populates gud-repeat-map
Date: Tue, 27 Jul 2021 01:48:20 +0300 [thread overview]
Message-ID: <875ywwbth7.fsf@mail.linkov.net> (raw)
In-Reply-To: <2138242899.459686.1627248504532@ichabod.co-bxl> (Brian Leung's message of "Sun, 25 Jul 2021 23:28:24 +0200 (CEST)")
>> There is one thing that I don't understand: is the
>> helper function gud-set-repeat-map-property really needed?
>>
>> If e.g. the defvar gud-gdb-repeat-map uses such symbols as 'gud-next',
>> could it put the 'repeat-map' property on the same symbols
>> with reference to the variable 'map' directly in these defvars?
>> Then only defvars will be needed, and no changes in gud-gdb, gdb.
>
> If we assign the repeat-map property within the defvars and avoid doing so
> in the M-x gdb commands, then after gud.el gets loaded, the repeat-map
> property on (say) gud-next will be 'jdb, since jdb-repeat-map is the last
> such foo-repeat-map defvar appearing in gud.el. In that case, calling M-x
> perldb and then running gud-next when repeat-mode is on will bring up the
> jdb-repeat-map, which contains some commands that aren't defined for
> perldb. So I think the gud-set-repeat-map-property macro (or something like
> it) is necessary.
You are right. Then I have only minor comments:
1. I thought that you want to create two separate maps for gud-gdb and gdb.
This is the reason why I suggested to rename gud-repeat-map to gud-gdb-repeat-map.
But since you use only one map for gbd and gud-gdb, then the name
gud-repeat-map is fine.
2. Is there a reason why gud-set-repeat-map-property should be a macro,
but not a function? When it's a macro, there are problems such that
when the user modifies the map, then the function that uses the macro
needs to be recompiled.
next prev parent reply other threads:[~2021-07-26 22:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 3:37 bug#49632: [PATCH] Ensure that M-x gdb populates gud-repeat-map Brian Leung
2021-07-19 13:06 ` Lars Ingebrigtsen
2021-07-19 13:13 ` Eli Zaretskii
2021-07-19 14:57 ` Brian Leung
2021-07-19 16:05 ` Eli Zaretskii
2021-07-19 21:53 ` Juri Linkov
2021-07-19 14:51 ` Brian Leung via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-19 15:37 ` Juri Linkov
2021-07-19 15:52 ` Lars Ingebrigtsen
2021-07-24 3:33 ` Brian Leung
2021-07-25 6:26 ` Lars Ingebrigtsen
2021-07-25 20:53 ` Juri Linkov
2021-07-25 21:28 ` Brian Leung
2021-07-26 22:48 ` Juri Linkov [this message]
2021-07-27 4:09 ` Brian Leung
2021-07-27 6:46 ` Brian Leung
2021-07-27 21:15 ` Juri Linkov
2021-07-28 11:30 ` Eli Zaretskii
2021-07-28 16:23 ` Juri Linkov
2021-07-28 16:30 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875ywwbth7.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=49632@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=leungbk@mailfence.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.