Commit Graph

396 Commits

Author SHA1 Message Date
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
03022d09f9
Remove doom//x naming convention
This naming convention was meant to be for batch commands, but it grew
to include "commands that were helpful with managing Doom", but many of
these commands shouldn't be interactive in the first place!
2018-06-17 21:35:58 +02:00
Henrik Lissner
04ec62c8f2
General, minor refactor & feedback revision 2018-06-14 19:49:03 +02:00
Henrik Lissner
77ac164651
Fix core libraries not loading
Caused because the load-path is reset to doom-site-load-path in
doom-initialize-packages, which was initialized before doom-core-dir was
added to it, so core-* libraries couldn't be found.
2018-06-12 12:18:21 +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
Henrik Lissner
6f98aeebfb
Don't set doom-init-modules-p from doom-modules
Causes user config to not be loaded if doom-modules is used earlier.
2018-06-10 20:58:00 +02:00
Henrik Lissner
f02156286b
Error if autoloads are missing interactively
Trying to regenerate them greatly complicates doom-initialize's
potential use-cases. Keep it simple stupid!
2018-06-10 20:57:14 +02:00
Henrik Lissner
19deb4b926
Fix buffer-read-only: autoloads.el error 2018-06-10 20:55:42 +02:00
Henrik Lissner
f144691157
Don't delete autoloads file
Turns out to be more error prone. Better to just ignore the existing one
when force-initializing Doom.
2018-06-10 19:07:37 +02:00
Henrik Lissner
a87641635f
load-prefer-newer = nil for private config
load-prefer-newer = t makes debugging harder and reduces the
predictability of your config.
2018-06-10 17:28:17 +02:00
Henrik Lissner
b079db8ec3
Refactor unneeded arg out of local function _load
In doom-initialize-packages.
2018-06-10 17:28:17 +02:00
Henrik Lissner
edb6fd1964
Change how private & disabled packages are marked
They are now included in doom-packages, but with :private t or :disabled
t properties. This allows us to search for them if we wish (e.g. for
doom info).
2018-06-10 17:28:17 +02:00
Henrik Lissner
88f1ae3797
Refactor autoloads init in doom-initialize
Simplify doom-initialize-autoloads
2018-06-10 17:28:17 +02:00
Henrik Lissner
01d1a814f9
Refactor doom-initialize functions
Removes doom-module-table; which was inflexible (though more stable). It
prevented you from putting your doom! block in anywhere but
~/.doom.d/init.el.

It is replaced (somewhat) by (doom-modules).
2018-06-10 17:30:26 +02:00
Henrik Lissner
1e2fc4227a
Fix void-variable: package--initialized error 2018-06-10 17:28:17 +02:00
Henrik Lissner
81c465a545
Move OS constants to core/core.el
So it is universally available to all of Doom, rather than excluding
sessions that haven't called doom-initialize interactively.
2018-06-08 13:31:45 +02:00
Henrik Lissner
b207c4040b
Minor, general refactor 2018-06-07 02:51:46 +02:00
Henrik Lissner
4978a64678
Create core directories before checking version
Otherwise the version cache file can't be written to!
2018-06-05 12:09:42 +02:00
Henrik Lissner
c9bfb58369
Minor, general refactor
Remove redundant keybinds, unused letvars, and fix
doom-module-load-path's docstring referencing its former signature.
2018-06-05 12:04:43 +02:00
Henrik Lissner
8124d5a893
Use package-activated-list for package count
Now that this variable is cached, it should always be available.
2018-06-05 12:04:43 +02:00
Henrik Lissner
282e0d6653
Move emacs version check into doom-initialize
Also fixes void-function errors caused by (now removed)
doom-same-emacs-version-p not being defined in all the contexts it was
needed.

Where it was before was clumsy design.
2018-06-05 12:04:43 +02:00
Henrik Lissner
6da8e5b3ab
Add error handling when loading autoloads files 2018-06-04 21:20:13 +02:00
Henrik Lissner
29005d9975
Load quelpa uncompiled to fix arrayp errors #647
Hopefully...
2018-06-04 21:19:46 +02:00
Henrik Lissner
9ba76b60dc
Refactor require! macro 2018-06-04 00:06:01 +02:00
Henrik Lissner
428f1e1d07
Refactor def-setting!/set! implementation
The `doom-settings` variable has been removed. Setting checks are done
with fboundp now, which is simpler.
2018-06-02 16:26:59 +02:00
Henrik Lissner
a0bec84997 Don't complain if no private packages.el 2018-06-02 01:08:23 +02:00
Henrik Lissner
b28d3414bb
Remove load-prefer-newer letvar around private init
Doesn't actually help and only slows things down.
2018-06-01 17:07:53 +02:00
Henrik Lissner
c04bccc68b
Fix disabled packages not being disabled
By loading the private packages.el in two passes. The first time ensures
later modules will know about disabled packages and the second time
ensures overwritten packages are properly overwritten.

Not the most efficient, but efficiency is low priority in noninteractive
sessions (i.e. during package management), the performance loss is
negligible, and packages.el files (should) have no other side effects
anyway.
2018-06-01 17:03:01 +02:00
Henrik Lissner
6bad6d12f3
Remove doom-psuedo-modules-dir
Not needed with now that doom-private-dir has first class support.
2018-06-01 17:01:39 +02:00
Henrik Lissner
bb6b91da9b
Downgrade missing module warnings to messages 2018-05-29 22:44:21 +02:00
Henrik Lissner
debe3e0dd3 Remove unnused letvar doom--inhibit-reload 2018-05-29 19:39:22 +02:00
Henrik Lissner
bd5ecc1aca
Display warning if a non-existent module is in your doom! block 2018-05-29 18:26:39 +02:00
Henrik Lissner
f8b9cff4aa
Get rid of doom-pre-init-hook 2018-05-28 16:07:11 +02:00
Henrik Lissner
2dc1be2ce8
Update load! macro docstring 2018-05-28 12:30:27 +02:00
Henrik Lissner
1a452b6842
💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
Henrik Lissner
dc7488df73
Remove package-initialize hack before package commands
Doesn't appear to be necessary anymore.
2018-05-25 19:26:11 +02:00
Henrik Lissner
644dc17e32
Minor refactor of doom-initialize-packages 2018-05-25 19:25:47 +02:00
Henrik Lissner
5ef1228201
Fix nested length form typos 2018-05-25 19:22:44 +02:00
Henrik Lissner
d7a5f3b997
Fix doom-module-table failing to fetch module list
...because sexp-at-point needs a valid syntax table, and fundamental
mode ain't got one.
2018-05-25 03:07:23 +02:00
Henrik Lissner
2b8efd6783
Error of private init.el doesn't exist (it really should!) 2018-05-25 02:54:16 +02:00
Henrik Lissner
2990d5bd58
Fix hash-table-p and format type errors on blank startup 2018-05-25 01:26:24 +02:00
Henrik Lissner
a390ef8deb
Reduce doom-module-table calls significantly 2018-05-25 01:17:01 +02:00
Henrik Lissner
11705d0920
Fix void-variable error (let -> let*) 2018-05-25 01:13:28 +02:00
Henrik Lissner
59f70c2a87
Soft-fail if doom-module-table can't find your private init.el 2018-05-25 01:11:53 +02:00
Henrik Lissner
d35598520f
Only package-initialize if uninitialized (from package.el API advice) 2018-05-24 21:20:02 +02:00
Henrik Lissner
9e07940b7c
Fix use-package autoload 2018-05-24 21:20:02 +02:00
Henrik Lissner
30893b0ff1
Fix doom-initialize-packages 2018-05-24 21:20:02 +02:00
Henrik Lissner
8282280965
core-packages: revise docstrings & comments 2018-05-24 21:20:02 +02:00
Henrik Lissner
8746c12fae
Redesign Doom bootstrap, caching & autoload generation logic
The autoloads file has been split into doom-autoload-file and
doom-package-autoload-file. The former is for Doom's modules and
standard library; the latter is for compiling all package autoloads like
load-path and auto-mode-alist (among other things).

This reduced my startup speed from ~1s to ~0.5s
2018-05-24 21:20:02 +02:00
Henrik Lissner
1369c51000
Replace :defer HOOK/FN with :after-call keyword 2018-05-21 01:38:17 +02:00