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

Try to require evil when compiling #41

Merged
merged 1 commit into from Oct 30, 2014

Conversation

ryuslash
Copy link
Contributor

Hi,

I've had problems with the evil part of evil-nerd-commenter for a while, getting the message that evilnc-comment-operator was undefined and I always worked around them by manually byte-compiling evil-nerd-commenter.el, sometimes twice. I've wanted to look into it for a while, but never got around to it.

This change fixes the situation for me. Passing the noerror argument to require is meant to keep evil-nerd-commenter from making evil a hard requirement. This doesn't help if people install evil-nerd-commenter first and then later add evil.

For a proper solution I would suggest looking into splitting the package in two, drastic as that may be. For example emacs-nerd-commenter and evil-nerd-commenter, where evil-nerd-commenter depends on both emacs-nerd-commenter and evil and emacs-nerd-commenter doesn't depend on anything.

This should help with #39 and possibly some others reporting the same problem.

Please let me know what you think, and if it helps.

If evil is not loaded during compilation the evil-specific code will not
work if evil is loaded later on as it seems the evil operator doesn't
get defined.
redguardtoo pushed a commit that referenced this pull request Oct 30, 2014
Try to require evil when compiling
@redguardtoo redguardtoo merged commit df140cc into redguardtoo:master Oct 30, 2014
@redguardtoo
Copy link
Owner

cool. thank you. a good solution.

@ryuslash
Copy link
Contributor Author

Actually, this doesn't help it seems. (require 'evil) works, but (require 'evil nil :noerror) still causes the same error to occur as before. I only tested with (require 'evil) and thought that adding a nil for filename and :noerror or t parameter to the call wouldn't change the outcome.

@ryuslash
Copy link
Contributor Author

And of course the only reason it works is because requiring evil fails and so prevents byte-compilation.

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.

None yet

2 participants