this commit adds a default keybinding for the vc-gutter hydra (leader-g
.) if both vc-gutter and hydra are enabled. It ensures that the various
vc-*-log-view-modes open up in emacs state, and it adds hg, svn and bzr
to the list of vc backends handled by git-gutter
Caused by over-zealous doom-switch-window-hook.
For my own sanity (and if you're curious), I'll break it down here:
1. Doom has a `doom-switch-window-hook` hook. It triggers when window
focus is changed.
2. We use `buffer-list-update-hook` to trigger
`doom-switch-window-hook`. (That may sound weird, but this hook is
reliably executed when window focus is changed -- there are
safeguards to prevent this from triggering too often)
3. `buffer-list-update-hook` triggers whenever a buffer is created, but
`doom-switch-window-hook` only triggers if the created buffer is in
a new window.
4. The use of `with-temp-buffer` in `centaur-tabs-line-format` counts as
"buffer creation" in a "new window".
5. `+vc-gutter-update-h` is in `doom-switch-window-hook`. This refreshes
git-gutter, which initiates a redraw of Emacs.
6. When Emacs redraws, it recalculates its mode and header lines. which
triggers `doom-switch-window-hook` once, which triggers
`+vc-gutter-update-h`, which redraws the screen, then Emacs recalculates
the header line, running `centaur-tabs-line-format`...
Infinite loop ensues
Hopefully fixes:
- hlissner/doom-emacs#2436
- ema2159/centaur-tabs#18
- ema2159/centaur-tabs#88
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:
(add-hook! :append 'some-mode-hook #'do-something)
Thsoe properties must now follow the hooks, e.g.
(add-hook! 'some-mode-hook :append #'do-something)
Other changes:
- Various add-hook calls have been renamed to add-hook! because I
incorrectly assumed `defun` always returned its definition's symbol,
when in fact, its return value is "undefined" (so sayeth the
documentation). This should fix#1597.
- This update adds the ability to add multiple functions to hooks
without a list:
(add-hook! 'some-mode-hook
#'do-something
#'do-something-else)
- The indentation logic has been changed so that consecutive function
symbols at indented at the same level as the first argument, but forms
are indent like a defun.
(add-hook! 'some-mode-hook
#'do-something
#'do-something-else)
(add-hook! 'some-mode-hook
(message "Hello"))
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.
Also changes def-package-hook! -> use-package-hook!
The old macros are now marked obsolete and will be removed when straight
integration is merged.
Disabling git-gutter in fundamental-mode theoretically reduces the
number of times git-gutter is initialized (because it has to switch to
and from fundamental-mode once, sometimes twice, when changing major
modes).
git-gutter also has trouble with org-indent-mode, so we disable it
there.
And it isn't useful in image-mode.
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.
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.
This change checks whether a file is remote before checking whether it's a version controlled repo, rather than the other way around. Gives a slight speed improvement to Tramp.
Phasing out the +module@name convention for plain old
+module-name-hydra, which is more compatible with elisp reflection tools
like describe-function and such.
Also, Emacs starts up faster now. Tee hee.