+ :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.
I prefer not to invent new variables when they aren't strictly
necessary. org-directory is one such variable (although the other path
variables are still necessary).
evil-org-set-key-theme blanks out evil-org-mode-map, undoing all our
custom keybinds. Using it isn't the correct way to customize evil-org,
but it is understandable people would use it expecting it to be, so
`+org|setup-evil` will now run after it is called.
The "Doom" way to customize evil-org would be to modify the
`evil-org-key-theme` variable, but with this change, either will work.
This is in preparation for general.el integration coming in 2.1.1. It is
very likely that map! will change (and even more, be split into several
macros). Not much, but change none-the-less. Specifically, the state
keywords (e.g. :nvi, :n, :i) will be removed in favor of a :state
property that takes a list, e.g. (normal visual insert).
In any case, both map! and general are also relatively expensive
compared to define-key and evil-define-key* (and the new define-key!
macro), so use that when we can.
This also means changes to either API won't affect Doom's modules in the
long term.
evil keeps track of auxiliary keymaps. This list is updated when you
switch states, but it _really_ needs to be updated when minor
modes (with keymaps) are toggled. When this isn't done, their keymaps
aren't recognized and their keys will be unavailable at first.
Since there is no global hook for enabling minor modes, we have to
manually add evil-normalize-keymaps to minor mode hooks.
This commit, specifically, fixes evil-org-mode-map. This also indirectly
fixes folding src blocks for evil users (on the first org buffer).
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")
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.
In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.
Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.
This gained me a modest ~10% boost in startup speed.