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.
The way Doom was using eval-after-load ensured its form were never
byte-compiled or even checked by the byte-compiler, because they were
treated as quoted forms (data), and thus eval'ed.
Friends don't let friends use eval.
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.
This lets you delay a body of code until an arbitrary condition is
met (which is checked whenever a file is loaded).
Also refactors set-file-template! to wait until +file-templates-alist is
defined.
+ 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
When appending multiple functions to a hook(s) with add-hook!, insertion
order was not preserved. e.g.
=> (add-hook! :append 'some-mode-hook #'(hook-1 hook-2))
=> some-mode-hook
(hook-2 hook-1)
Due to changes under the hood, the :files FORM property requires FORM to
either be a nested form of and/or sexps, or a single string. This is
inconsistent with the plurality of ":files", so it has been fixed to
accept a list of strings (with an implicit (and ...)).
By default, transient hooks are defined as doom-transient-hook-N, where
N is a counter. This makes debugging them difficult.
Now, you may specify an id for the second argument. e.g.
(add-transient-hook! 'find-file-hook load-evil (require 'evil))
Will define doom|transient-hook-load-evil, which is easier to debug and
remove, if necessary.