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

configuration-layer/package-used-p is inconsistent with cfgl-package-used-p #16346

Open
bcc32 opened this issue Apr 1, 2024 · 1 comment
Open
Assignees

Comments

@bcc32
Copy link
Contributor

bcc32 commented Apr 1, 2024

As mentioned in the title, the two functions
configuration-layer/package-used-p and cfgl-package-used-p have
inconsistent behavior with respect to certain packages.

In particular, if a package is disabled through a :toggle keyword
whose form evaluates to nil, configuration-layer/package-used-p will
return t for that package while cfgl-package-used-p will return
nil.

cfgl-package-used-p's behavior seems more correct to me---these
functions are used frequently in Spacemacs to figure out whether some
other layer is going to configure that package and cause it to, for
example, be responsible for implementing some key bindings. In which
case, the :toggle evaluating to nil should cause the code to assume
that the package in question is not used, for this purpose.

In any case, it seems like configuration-layer/package-used-p should
be a very thin wrapper around cfgl-package-used-p and not implement
any of its own logic. @smile13241324, do you agree with this idea?

@smile13241324
Copy link
Collaborator

Yep I think this makes sense

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

No branches or pull requests

2 participants