Commit Graph

400 Commits

Author SHA1 Message Date
f6dc6ac74e Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
643c64c19f Prevent creation of ~/.emacs.d/elpa
Due o package-gnupghome-dir not being set properly.
2018-06-20 12:45:51 +02:00
151858a8dc Redesign Doom error handling
Another refactor, again to improve the locality of doom errors and make
the data that accompanies them more useful in determining the origin and
source of issues. Also, bin/doom is now a little more informative about
how to debug errors.
2018-06-20 02:07:12 +02:00
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
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
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
04ec62c8f2 General, minor refactor & feedback revision 2018-06-14 19:49:03 +02:00
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
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
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
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
19deb4b926 Fix buffer-read-only: autoloads.el error 2018-06-10 20:55:42 +02:00
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
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
b079db8ec3 Refactor unneeded arg out of local function _load
In doom-initialize-packages.
2018-06-10 17:28:17 +02:00
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
88f1ae3797 Refactor autoloads init in doom-initialize
Simplify doom-initialize-autoloads
2018-06-10 17:28:17 +02:00
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
1e2fc4227a Fix void-variable: package--initialized error 2018-06-10 17:28:17 +02:00
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
b207c4040b Minor, general refactor 2018-06-07 02:51:46 +02:00
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
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
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
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
6da8e5b3ab Add error handling when loading autoloads files 2018-06-04 21:20:13 +02:00
29005d9975 Load quelpa uncompiled to fix arrayp errors #647
Hopefully...
2018-06-04 21:19:46 +02:00
9ba76b60dc Refactor require! macro 2018-06-04 00:06:01 +02:00
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
a0bec84997 Don't complain if no private packages.el 2018-06-02 01:08:23 +02:00
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
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
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
bb6b91da9b Downgrade missing module warnings to messages 2018-05-29 22:44:21 +02:00
debe3e0dd3 Remove unnused letvar doom--inhibit-reload 2018-05-29 19:39:22 +02:00
bd5ecc1aca Display warning if a non-existent module is in your doom! block 2018-05-29 18:26:39 +02:00
f8b9cff4aa Get rid of doom-pre-init-hook 2018-05-28 16:07:11 +02:00
2dc1be2ce8 Update load! macro docstring 2018-05-28 12:30:27 +02:00
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
dc7488df73 Remove package-initialize hack before package commands
Doesn't appear to be necessary anymore.
2018-05-25 19:26:11 +02:00
644dc17e32 Minor refactor of doom-initialize-packages 2018-05-25 19:25:47 +02:00
5ef1228201 Fix nested length form typos 2018-05-25 19:22:44 +02:00
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
2b8efd6783 Error of private init.el doesn't exist (it really should!) 2018-05-25 02:54:16 +02:00
2990d5bd58 Fix hash-table-p and format type errors on blank startup 2018-05-25 01:26:24 +02:00
a390ef8deb Reduce doom-module-table calls significantly 2018-05-25 01:17:01 +02:00
11705d0920 Fix void-variable error (let -> let*) 2018-05-25 01:13:28 +02:00
59f70c2a87 Soft-fail if doom-module-table can't find your private init.el 2018-05-25 01:11:53 +02:00
d35598520f Only package-initialize if uninitialized (from package.el API advice) 2018-05-24 21:20:02 +02:00
9e07940b7c Fix use-package autoload 2018-05-24 21:20:02 +02:00