Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Emacs 28's repeat-mode for working with Holes #6548

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phikal
Copy link
Contributor

@phikal phikal commented Mar 20, 2023

Emacs 28 has a global minor mode called repeat-mode that allows commands to define temporary keymaps that should be enabled right after the command was invoked. One example: other-window (C-x o) can be repeated with a single o, without the C-x prefix when the mode is enabled.

I proposed adding some basic support for Agda-mode as well. The commands are defined in agda2-movement-repeat-map and the keys are just abbreviations of the default bindings. This means that if repeat-mode is enabled, you can now step through the holes in a file by just pressing C-f. I have currently implemented it in a way that you can switch back and forth between navigation, manipulation (case, refining, give) and querying. If this is not considered to be a good idea, we can also split it up into disjunct repeat maps.

This was initially unintentionally incorrectly part of #6536, but I have adjusted that pull request and extracted the changes into this one.

@phikal phikal changed the title Agda repeat mode Add support for Emacs 28's repeat-mode for working with Holes Mar 20, 2023
@jespercockx
Copy link
Member

According to #6123 (comment), this should only be merged AFTER #6536

@jespercockx jespercockx added this to the 2.6.4 milestone Jul 8, 2023
@plt-amy plt-amy modified the milestones: 2.6.4, 2.6.5, 2.6.4.1 Jul 21, 2023
@andreasabel andreasabel modified the milestones: 2.6.4.1, 2.6.5 Nov 30, 2023
@phikal phikal force-pushed the agda-repeat-mode branch 3 times, most recently from 6376ecf to 271917a Compare February 21, 2024 06:48
This makes use of Emacs 28's repeat-mode that temporarily defines
transient keys for certain commands after they their usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants