Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make el-get an optional dependency. fix #53
- Loading branch information
Showing
2 changed files
with
22 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f97d753
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is optimal. If req-package and el-get are both installed, but req-package happens to be loaded before el-get is added to the load-path, the
:el-get
keyword will not be defined. I think it's better to call(require 'el-get t)
within each function and throw an error at runtime if it fails, rather than do a single check at load time. That way, as long as el-get has been loaded by the time you callreq-pacakge-finish
, everything should be ok.I can code up this proposal myself if you want. Just let me know.
f97d753
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, or you could just useEdit: Although going with my idea above would give better error messages. Usingeval-after-load
, I suppose.eval-after-load
will cause an error about:el-get
being an unknown keyword (if el-get isn't loaded), while using the above idea would allow you to control the error message.