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 :meow-state keyword for use-package declarations #350

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

Conversation

Olivia5k
Copy link

Add simple keyword :meow-state added to use-package declarations. Used to help populate meow-mode-state-list, as follows:

(use-package sly
  :meow-state ((sly-inspector-mode . motion)
               (sly-db-mode . motion)))

The above would make the sly-inspector and sly-db modes start in Meow's motion state.

Since I know that it's important to the meow project to not have any external dependencies, the meow-use-package module will only be loaded if use-package is installed. I also added a mention in CUSTOMIZATIONS.org, so that it's mentioned somewhere in the documentation. I hope it was the right place to put things.

@DogLooksGood
Copy link
Collaborator

Thanks for the contribution.
We have meow-shims.el for all the 3rd party related code.

@Olivia5k
Copy link
Author

Oh, that makes sense. I'll move the things there.

@Olivia5k
Copy link
Author

@DogLooksGood I've moved the code and removed the other files. I didn't put the loading of this specific code into the meow--enable-shims function, since that doesn't make sense for the context in which use-package is used. use-package keywords need to be added at compile time, otherwise packages using them won't see them.

Does that work?

@DogLooksGood
Copy link
Collaborator

Yeah, it looks good to me.

@Olivia5k
Copy link
Author

Olivia5k commented Oct 16, 2022

Error: Aliases should start with the package’s prefix "meow".
Error: "use-package-handler/:meow-state" doesn’t start with package’s prefix "meow".
Error: ‘use-package-handler/:meow-state’ contains a non-standard separator ‘/’, use hyphens instead (see Elisp Coding Conventions).

I don't know how to fix those. The alias cannot have the meow prefix, since it's aliasing something outside of meow, and it has to use the / as a separator because that's what use-package uses. What do we do? Can we disable those checks for this code specifically?

EDIT: Doesn't seem like it's possible currently. Not sure how to move forward with this then. 😕

@DogLooksGood
Copy link
Collaborator

Let me do some research here :)

@Absinthe8383
Copy link

is there any progress on this, this seems like a good addition who use use-package

@DogLooksGood
Copy link
Collaborator

I simply has no idea about how to get rid of those messages. Probably there's a way to let the linter to ignore it?

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.

3 participants