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

Incorporate evil-repeat into symex-command macros #97

Open
countvajhula opened this issue Mar 14, 2023 · 1 comment
Open

Incorporate evil-repeat into symex-command macros #97

countvajhula opened this issue Mar 14, 2023 · 1 comment
Assignees

Comments

@countvajhula
Copy link
Collaborator

In order to mark a function as repeatable for the purposes of evil-repeat (dot), we do this in symex-evil.el:

  (dolist (fn symex--evil-repeatable-commands)
    (evil-add-command-properties fn :repeat t)))

This loops through a list of explicitly declared repeatable commands which are then "registered" for repetition in this way. This has a few drawbacks:

  1. We need to explicitly declare commands as repeatable, so it's extra maintenance work.
  2. If users write commands for Symex, they would need to explicitly register it for repetition in the same way.

Now that we have the new macros symex-define-command and symex-define-insertion-command (which are basically just the same function definitions as before but wrapped with logic common to all commands -- currently just tidying), we can add the registration in the macros and eliminate the need to explicitly maintain the list. User commands defined using these macros would also implicitly be repeatable.

@countvajhula countvajhula converted this from a draft issue Mar 14, 2023
@countvajhula
Copy link
Collaborator Author

@j-shilling in case you have time to look at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants