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.
- So the mode-line doesn't "hide" the last line of the popup
- So org doesn't delete all other windows when displaying the *Org tags*
popup
- Minor corrections to comments in ui/popup/+hacks.el
- Fixes#1506: unsets uniquify-buffer-name-style to work around breakage
in persp-mode having to do with buffers being retrospectively renamed.
See Bad-ptr/persp-mode.el#104.
- Move creation of main workspace into persp-mode-hook, to ensure main
workspace always exists and nil workspace is never active.
- Remove +workspaces|init-frame and significantly reduce LOC in
+workspaces|init to the bare essentials. This _may_ break persp-mode
in daemon Emacs, but I'll deal with that next.
We stop relying on the built-in mechanism for auto-registering a buffer
to the current workspace, because it misses many buffers (e.g. when we
switch buffers with SPC b b). Instead, we add buffers when they are
interactively switched to.
Due to the prompt, you can't scroll the git-gutter popup, making it
difficult to see the full diff. This isn't a perfect fix but at least
improves the situation.
- 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).
Not that you should use this module. It is now more of an experiment to
get more conventional tab-like functionality in Emacs, without the help
of tabbar-mode, which doesn't actually do what we want.
Over time I may improve this (or not).
This resolves an issue where the popup manager would open another popup
if a previous one had been raised. The popup manager now delegates to
the existing buffer if it already exists (without resizing it).