Closed chillum closed 9 years ago
I've edited my patch to come with a better solution.
We should always add EVIL stuff, but should not fail to compile if we have no evil.
In fact, we don't want that compile-time require at all and everything is OK.
Note that this patch is pretty much reverting a9f30b76a33b4c10af0ccc1cd70c5d61697988b4, which was introduced to fix #81 (without that line, ag.el doesn't work when Emacs is started afresh due to the macro not being expanded). See the discussion in #82 -- I think this is impossible to fix in ag.el itself, and we need to push the fix upstream.
Uhm, that seems weird, but I got it.
Take a look at this version, maybe, everyone will be happy with it:
eval-after-load
without feature evil
myself)I can't reproduce the expanding of eval-after-load without feature evil myself
Sorry, I didn't express that very clearly. The macro that causes problems is evil-add-hjkl-bindings
. If evil-add-hjkl-bindings
is not defined when the file is byte-compiled, Emacs assumes it's a function rather than expanding it. As a result, when the user loads evil, they get an error Invalid function: evil-add-hjkl-bindings
(this was issue #81).
I'm going to merge this, because it's definitely an improvement. Once evil upstream accepts our patch: https://gitorious.org/evil/evil/merge_requests/75 I think we should remove all references to evil in ag.el.
ag.el
currently fails compiling if there is noevil-core
package.My patch allows
ag.el
to skip the evil stuff if(require 'evil-core)
fails at compile time.I admit, omitting the evil stuff if we have no evil at compile-time is not very graceful, but it's surely nicer then failing the compilation if user has no evil.