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

Advice for require-package and featurep #1057

Open
zhanyi22333 opened this issue Sep 28, 2023 · 1 comment
Open

Advice for require-package and featurep #1057

zhanyi22333 opened this issue Sep 28, 2023 · 1 comment

Comments

@zhanyi22333
Copy link

As an example, I use require-package to install and require 'vterm. And (featurep 'vterm) return nil.

And in another package vterm-toggle, it require vterm. The require function use featurep to define whether vterm is loaded. This lead to double load of vterm and lead emacs to crash finally.

I think the biggest problem is that require-package doesn't act like require when you check the symbol with featurep, which may lead to double load and is hard to detect.

ls there some way to fix it?

@redguardtoo
Copy link
Owner

Not sure what's the problem. require-package installs a package from elpa. require load a package if it can be found from load-path. featurep checks if a package is loaded. You can require a package multiple times. require has some builtin code works same way s featurep.

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