Commit Graph

20 Commits

Author SHA1 Message Date
Henrik Lissner
0fefc43d39
Refactor autoloads init & error handling
Also reduces byte-compiled forms in the backtrace of a
doom-autoload-error.
2018-06-19 17:19:11 +02:00
Henrik Lissner
4685eddb66
Don't eat stacks in backtraces in debug mode
The error handlers were a little too effective. They obscured a large
chunk of the stacktrace after errors, even in debug mode. This fixes
that and ensures backtraces in debug mode are more helpful.
2018-06-18 17:14:17 +02:00
Henrik Lissner
32954ecb69
Move compile-time fix for disabled packages
This fix prevented the byte-compiler from trying to load packages that
were disabled or failed their :when/:unless/:if predicates. This commit
moves it into doom-byte-compile, so the :no-require predicate doesn't
have to run on every package in an interactive session, eating MY
PRECIOUS cpu cycles.

I do love my cpu cycles, yessiree.
2018-06-18 14:52:24 +02:00
Henrik Lissner
ab07e07352
Improve general error handling at startup
This will hopefully reveal more information as to the cause and origin
of errors at startup. It should also make doom-debug-mode more likely to
produce a backtrace in non-interactive sessions.
2018-06-18 14:47:36 +02:00
Henrik Lissner
08f01edafd
Mark settings obsolete (properly)
And make set! noisy about settings that don't exist anymore, when
evaling it interactively.
2018-06-18 13:38:27 +02:00
Henrik Lissner
194bcf4c60
Silence byte-compiler warning: unused lexical arg 2018-06-17 02:21:46 +02:00
Henrik Lissner
a1278f3dff
Refactor def-package!
Rely on use-package mechanisms. def-package! should be as thin a wrapper
as possible. Ideally, we should simply be an alias, but there is no way
to inject :disabled into a use-package declaration, because it is
treated especially.
2018-06-16 00:36:27 +02:00
Henrik Lissner
f81a0e6f41
Remove redundant def-setting! docstrings
def-setting! will now grab the autodef's docstring if it has an
:obsolete property defined.
2018-06-15 16:54:39 +02:00
Henrik Lissner
98632fe086
Fix doom-module-from-path on module directories
Allow PATH to be an exact path to a module.
2018-06-15 16:20:20 +02:00
Henrik Lissner
c22b3da9f9
Move emacs/electric-indent to emacs/electric
This module will later be expanded to customize more of electric's
functionality.
2018-06-15 16:20:20 +02:00
Henrik Lissner
715167bec8
Add ability to mark modules as obsolete or moved
Better way to communicate to users that modules have moved without
breaking their config.
2018-06-15 16:20:20 +02:00
Henrik Lissner
d8b1e469bc
Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
Henrik Lissner
04ec62c8f2
General, minor refactor & feedback revision 2018-06-14 19:49:03 +02:00
Henrik Lissner
cc3fd3126a
Fix "Failed to parse X" errors from use-package
use-package-handler/:after-call was (accidentally) relying on the
dynamic value of `name`, but now that use-package uses lexical binding,
this isn't possible anymore, causes errors.
2018-06-14 11:53:52 +02:00
Henrik Lissner
08a4701774
Fix case where private init.el has no doom! block
This shouldn't error out. It's better if Doom ran normally, just without
any of its modules activated.

Addresses issue mentioned in #681
2018-06-14 00:45:57 +02:00
Henrik Lissner
4c2107d595
Refactor doom-module-from-path
If PATH is omitted, use (FILE!); also use doom-keyword-intern.
2018-06-12 21:07:34 +02:00
Henrik Lissner
acbad5ca01
Add ALL-P parameter to doom-module-load-path
Allowing it to return path to *all* modules, whether or not they are
activated.
2018-06-12 21:07:34 +02:00
Henrik Lissner
9ec0461162
Revert "Refactor def-package!"
This reverts commit f7a86ae281.

Turns out it's still needed when byte-compiling!
2018-06-12 01:58:06 +02:00
Henrik Lissner
f7a86ae281
Refactor def-package!
It is no longer necessary to gate use-package calls with
:if/:when/:unless checks during byte-compilation. This was fixed
somewhere along the way.
2018-06-12 00:26:28 +02:00
Henrik Lissner
0741c8851a
Split core-packages into two (packages & modules)
+ Move doom-initialize et co into core.el
+ Lazy load core-packages
+ load! has been moved into core-lib
+ Added FILE! and DIR! macros
+ Fix package! not returning correct value when package is disabled
+ Remove :disabled support for def-package-hook! officially
2018-06-12 00:02:04 +02:00