-
Notifications
You must be signed in to change notification settings - Fork 261
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
Strange behavior during byte-compilation. #636
Comments
I also had this problem. The discussion in #590 put me on the right track. I solved it by adding this
|
Wasn't aware of that option, thanks much! |
use-packageをbyte-compileするとエラー・警告が複数出る。 ファイル分割の影響と、use-packageのバグと、複数理由がありそう。 今後、init-loaderを導入して解決をはかる、かもしれない。 とりあえず、byte-compileの例外とする。 参考: jwiegley/use-package#636
use-packageをbyte-compileするとエラー・警告が複数出る。 ファイル分割の影響と、use-packageのバグと、複数理由がありそう。 今後、init-loaderを導入して解決をはかる、かもしれない。 とりあえず、byte-compileの例外とする。 参考: ttps://github.com/jwiegley/use-package/issues/636
Could someone explain what is the problem here exactly, or even better provide a minimal example that is not working? As it stands, I don't think I understand what this is about. I also don't personally byte-compile my init file, so please forgive me if I'm missing something obvious. Thanks in advance. |
I've been playing with techniques to speed up Emacs, which led me down the road of byte-compiling my init file. As you can see, that file contains a bunch of
quse-package
expressions which macroexpand intouse-package
expressions which macroexpand into nice tight initialization code. The linked artifact is the version of the file I've used without byte compilation for some time. To eliminate warnings I took advantage of the new use-package 2 features and tried to predefine functions which the compiler complained about.However,
:functions
and:defines
seem to have no effect on the generated warnings. I looked for issues similar to mine and found #198, then dove into the source here:use-package/use-package-core.el
Line 633 in 6af4b6c
byte-compile-current-file
. I'm not well-versed in Emacs' macro-expander, but are recursive expansions done in the same file or in such a way that the file would be different?eval-when-compile
is implemented without checking state variables, with a mechanism which I'm not familiar with and need to look into further.My issue can be solved by using
:preface
,defvar
, anddeclare-function
liberally but the other keywords are a nice convenience feature and perhaps solving the recursive expansion problem can help with that other reported bugs.I develop a package that I found useful to leverage use-package's power in my own config. You can find it at jaccarmac/quse-package and example usage in http://chiselapp.com/user/jaccarmac/repository/dot-emacs-dot-d/artifact/90fda1f9e5dbe46c. May be helpful for resolving the issue, maybe not.
The text was updated successfully, but these errors were encountered: