-
Notifications
You must be signed in to change notification settings - Fork 275
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
Hash-quote functions? #22
Comments
I try to do it when I remember, but it's not important to me whether it's there or not there. |
So it's supposed to be |
Lets go with 'both are fine, hash quote is better but not required.'? |
Yup. |
I'm actually realizing from #31 that it might be better to single-quote symbols if we don't want the compiler to complain when using optional packages. Unless you know of a better option other than forward-declaring a bunch of functions, what do you think about just going with single quotes @Ambrevar? @fbergroth Feel free to give your input too. |
@jojojames it depends on how we want to the resolve compiler warnings. I don't believe you can forward-declare functions in the same way as variables. I experimented a bit, and found two ways to work around the unresolved function warnings. Either we wrap calls with (eval-when-compile
(setq byte-compile-warnings
'(free-vars
;; unresolved
callargs
redefine
obsolete
noruntime
cl-functions
interactive-only
lexical
make-local
mapcar
constants
suspicious))) I think |
Here's the ones I have so far. If you don't see one in the below list, assume I've done something for it. :) cask exec emacs -Q -batch
This looks to be because of a quick macro I wrote. Not sure what's going on here but I hacked up the code for edebug anyways.
The first seems to be due to evil-define-key and map variable. The second seems to be due to calling functions from third party packages. We can also use fboundp. (when (fboundp 'company-tng-configure-default)
Same thing here, can just tweak the call to evil-surround-mode with either fboundp or with-no-warnings.
Also same, fboundp/with-no-warnings. I'm not to worried about either/or. If anyone had strong objections to either, feel free to raise it. Otherwise use which ever one. Otherwise single quoting functions seem to be the right call. I'm not a fan of the boilerplate. Thanks for looking into this @fbergroth. |
I pushed another PR, #34. I went for The warning in
|
Lets settle on no hash-quotes then. Feel free to reopen if you have an issue @Ambrevar. |
I think we should no block-wrap using Besides it's not pretty and inconsistent with the rest of the code out there. Warnings are what they are: indicators. Silencing warnings is not a purpose in itself. If we want to silence those specific warnings, it should be done on the linter side, not in the code which is fine. |
@Ambrevar one item in the checklist when submitting a melpa recipe is "My elisp byte-compiles cleanly". Also, most good emacs packages makes sure byte compilation is without warnings. It's ugly for a user to get a bunch of warnings thrown at you when installing a package. |
Many MELPA packages throw warnings when they are byte-compiled. |
I think that's their problem. We should strive to have a clean byte compile. Fboundp is still an option. @Ambrevar Do you have a problem with hash quotes or the -with-no-warnings? If the latter, let's use a different topic thread. |
I do believe that is a checklist item by the way. The fact that other packages stop "trying" later on is on them. |
@Ambrevar with that reasoning, evil-collection shouldn't require with noerror as well. This all is a hack to release this as a single package without declaring a dependency on every third party package. |
Let's move this discussion to a new issue. |
@Ambrevar I am closing this one unless you have a problem with not hashquoting functions. |
Should we hash-quote all functions in all bindings?
The text was updated successfully, but these errors were encountered: