Skip to content

Unset insert-exit-key when it isn't needed anymore#774

Open
ventruvian wants to merge 1 commit intomeow-edit:masterfrom
ventruvian:cleanup-beacon-insert-exit-key
Open

Unset insert-exit-key when it isn't needed anymore#774
ventruvian wants to merge 1 commit intomeow-edit:masterfrom
ventruvian:cleanup-beacon-insert-exit-key

Conversation

@ventruvian
Copy link

@ventruvian ventruvian commented Nov 20, 2025

  • meow--beacon-insert-enter-key previously stayed around
  • This didn't produce any issues since it was unset by meow-beacon-start
  • However cleaning it up makes it an indicator for whether or not recording takes place. This can be helpful for user-code or other packages. Edit: My mistake, it is not macro recording that this indicates, but execution from beacon
  • This behaviour seems more consistent otherwise it's meaning changes before the first invokcation of beacon- mode and after.

I resort to advicing this function to determine if recording macro-execution is taking place, here for example.
Not sure if that is a good way to do it, but regardless it seems like good style to clean this variable up.

- `meow--beacon-insert-enter-key` previously stayed around
- This didn't produce any issues since it was unset
  by meow-beacon-start
- However cleaning it up makes it an indicator for whether
  or not recording takes place. This can be helpful for
  user-code or other packages.
- This behaviour seems more consistent otherwise it's
  meaning changes before the first invokcation of beacon-
  mode and after.
@DogLooksGood
Copy link
Collaborator

I think there's no harm to reset it. But why not use defining-kbd-macro as an indicator for recording?

@ventruvian
Copy link
Author

ventruvian commented Nov 21, 2025

That was the first thing I attempted, but it was nil in my use-case.

I realize now that I was mistaken: It is not "recordingp" that I need to know, but rather "executingp".

I need to know if insert-functions are called from a kbd macro previously defined with beacon. I did try to switch on executing-kbd-macro too, but it is also nil at the time I need to make a decision (whether to drop into INSERT or a lispy-mode-enabled state).

As far as I have investigated meow--beacon-insert-enter-key seems to be the only state with the information I need. I'm not super happy with this either, it is certainly a very indirect way of determining that.

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.

2 participants