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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/data/emacs-mode/agda2-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,29 @@ constituents.")
m)
"Bindings for `agda2-mode'.")

(defvar agda2-movement-repeat-map
(let ((m (make-sparse-keymap)))
(define-key m (kbd "C-f") #'agda2-next-goal)
(define-key m (kbd "C-b") #'agda2-previous-goal)
(define-key m (kbd "C-SPC") #'agda2-give)
(define-key m (kbd "C-r") #'agda2-refine)
(define-key m (kbd "C-c") #'agda2-make-case)
(define-key m (kbd "C-,") #'agda2-goal-and-context)
(define-key m (kbd "C-.") #'agda2-goal-and-context-and-inferred)
(define-key m (kbd "C-;") #'agda2-goal-and-context-and-checked)
m)
"Agda bindings to repeat in conjunction with `repeat-mode'.")

(dolist (command '(agda2-next-goal
agda2-previous-goal
agda2-give
agda2-refine
agda2-make-case
agda2-goal-and-context
agda2-goal-and-context-and-inferred
agda2-goal-and-context-and-checked))
(put command 'repeat-map agda2-movement-repeat-map))

(defvar agda2-common-menu-items
'(["Solve constraints" agda2-solve-maybe-all]
["Auto" agda2-auto-maybe-all]
Expand Down