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.
magit-clone function has changed signature to work with transient.
So using the new magit-clone-regular instead.
Signed-off-by: Huy Duong <huy.duong@employmenthero.com>
If you accidentally open multiple magit status windows, you'll be stuck
in a deadlock, where `q` will do nothing. Now, +magit/quit will use
`quit-window` on excess magit-status windows instead.
Instead of magit-post-refresh-hook, which fires much more frequently.
Updating vc across all buffers is expensive, so let's only do it when we
quit magit.
Warning: this may make quitting magit expensive when you have many
buffers open. Still searching for a better solution.
Full column is a bit tempermental. This also removes the need to restore
the window config after quitting magit.
Why the switch from full-frame magit to current-buffer? It is the least
intrusive policy; it doesn't rearrange the user's workspace.
The old policy was to invoke magit in fullscreen, but in practice, I've
found myself wanting to peek at other buffers (maybe even notes) while I
manage my project in version control.
So this change introduces two big changes and one fix:
+ Instead of a full-frame policy, we use full-column. e.g. Invoking
magit-status will take up a full column of windows (and will restore
them when you quit).
+ Popups are displayed below the current window if called from a magit
buffer, otherwise as a popup at the bottom of the frame.
+ Fixes popups opening in a random window if called from a magit buffer
in a popup.
This is only a start and needs more testing.
+magit-display-buffer-fullscreen is a more sophisticated (albeit
experimental) replacement for magit-display-buffer-fullframe-status-v1,
which fullscreens magit, but will also:
a) Keep the status window visible
b) Treat magit buffers not opened from magit-status as popups
Must be enabled on a per-project basis. You can change this behavior by
setting +magit-hub-enabled-by-default to non-nil (before magit is
loaded).
Magithub has been made opt-in because:
1. Magithub is imposing, asking the user for a token, especially for
users who don't use github (much or at all), but may occasionally
have a project with a github remote.
2. magithub is really slow on first load for medium-to-large repos.
3. It's really easy to enable it through the magithub popup (H C e).
magithub.enabled is saved into the project's .git/config file, so the
setting will persist.
Also added a docstring to +magit-hub-features
Ensures magit buffers are cleaned up after magit-status is closed. Will
defer cleanup on process buffers, until the processes have finished.
Also fixes issue where quitting magit will leave leftover windows.