This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:
1. Replace the bar | to indicate a hook function with a -h suffix, e.g.
doom|init-ui -> doom-init-ui-h
doom|run-local-var-hooks -> doom-run-local-var-hooks-h
2. And add a -fn suffix for functions meant to be set on variables,
e.g.
(setq magit-display-buffer-function #'+magit-display-buffer-fn)
See ccf327f8 for the reasoning behind these changes.
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.
In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.
doom*shut-up -> doom-shut-up-a
doom*recenter -> doom-recenter-a
+evil*static-reindent -> +evil--static-reindent-a
The rationale behind this change is:
1. Elisp's own formatting/indenting tools would occasionally struggle
with | and * (particularly pp and cl-prettyprint). They have no
problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
github markdown) struggle with it, sometimes refusing to highlight
code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
on haphazardly way back when Doom was simply "my private config".
Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.
Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
macro. The old pair weren't as useful. The new def-advice! saves on a
lot of space.
- Removed "stage" assertions to make sure you were using the right
macros in the right place. Turned out to not be necessary, we'll
employ better checks later.
- Don't prompt about processes when killing buffer
- Hide modeline in vterm buffers (doesn't do anything useful and would
be consistent with settings for eshell and term modules).
- Refactor +vterm/open & +vterm/open-popup
- Add Emacs window redraw hack to force vterm to redraw, fixing
artefacting in some edge cases.
- Fix ansi-color-names-vector when solaire-mode is present, otherwise
you get a mismatched background in vterm (and other terms).
Fixes an issue where doom-themes-{org,neotree,treemacs}-config are
called before doom-themes is loaded (which may never happen if you
aren't using a doom-themes theme).
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!
Instead of only activating in buffers that a real (which is more
selective), simply activate in buffers that are file-visiting (this
means that real buffers that aren't highlighted can exist, particularly
term/eshell buffers).
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.
There was no way to customize doom-fringe-size. Better to customize
fringes by using fringe-mode, {left,right}-fringe-width or
set-window-fringes directly.
Now +doom-solaire-themes is an alist that informs Doom if the current
theme should be loaded with solaire-mode, and whether
solaire-mode-swap-bg should be used.
This is a breaking change! Update your :popup settings. Old ones will
throw errors!
Doom's new popup management system casts off its shackles (hur hur) and
replaces them with the monster that is `display-buffer-alist`, and
window parameters.
However, this is highly experimental! Expect edge cases. Particularly
with org-mode and magit (or anything that does its own window
management).
Relevant to #261, #263, #325
+ doom-init-ui-hook => doom-init-theme-hook
+ Remove specific mode hooks for solaire-mode (need to revisit this)
+ Preemptive removal of doom-popup-mode hook
+ Use function for hs-set-up-overlay instead of lambda
I am removing settings for core configuration to reduce "magic" in Doom.
set! is meant for cross-configuring modules that may or may not be
enabled. There should be no such concern for configuring Doom core.
From now on, change your fonts with:
(setq doom-font (font-spec :family "Fira Mono" :size 12)
doom-variable-pitch-font (font-spec :family "Fira Sans")
doom-unicode-font (font-spec :family "DejaVu Sans Mono")
doom-big-font (font-spec :family "Fira Mono" :size 19))