featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.
featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
But only if undo-tree-visualizer-diff is disabled. If it's enabled,
undo-tree has its own opinions on how to manage the two windows which
don't mesh well with our popup manager, so we leave undo-tree to its
devices.
Fix: #5617
Since the which-key window didn't have focus, its C-h keybinds were
unpredictably unresponsive, making next/previous-page navigation et co
finnicky. This commit restores the needed focus.
Ref https://www.reddit.com/r/emacs/comments/pwr7va/comment/heydq4g
Invoke org-edit-src and an edit buffer is displayed for the src block at
point. If that popup is killed incorrectly, it leaves the original org
buffer (specifically, the src block you were editing) in a half-broken
state; forever waiting for you to finish editing that block.
This can happen when the edit window is a popup window and you switch
workspaces (which temporarily deletes popup windows), so clean up those
popups properly before switching.
In the presence of multiple, horizontal splits, the org-todo popup
consumes ~50% of the vertical real-estate of its northern neighbor when
created. This is due to an edge case with some failsafe code somewhere
down org-fit-window-to-buffer's stack. This fix ensures the popup is
always a sane size.
And by enabling +popup-buffer-mode in it, we ensure it will be treated
as a popup (e.g. solaire-mode will be active in it, no modeline, etc).
- If there's only one other window, delete-window would be called,
instead of delete-other-windows
- when there is only one window other than the popup, this other window
is the main window in this frame, delete it would raise an error:
`delete-window: Attempt to delete main window of frame <frame name>`
A change upstream causes the prompt to be suppressed if the current
command wasn't run interactively. The check for interactivity gets
tricky when advice are involved.
This removes a few popup advice functions that are no longer necessary
and changes how we handle org agenda windows (they're now displayed in
the current window, rather than a popup -- see org-agenda-window-setup
to change this).
Other issues addressed:
+ Fixes 'Attempt to delete main window of frame' errors when using
org-todo from popups (particularly in daemon Emacs).
+ Removed the custom 'popup-window options for org-agenda-window-setup
and org-src-window-setup, and change them to 'current-window and
'other-window, respectively.
This commit does two things:
- Renames def-advice! to defadvice!, in the spirit of naming convenience
macros after the function/macro they enhance or replace.
- Correct the names of advice functions to indicate visibility and
intent. A public advice function like doom-set-jump-a is meant to be
used elsewhere. A private one like +dired--cleanup-header-line-a
shouldn't -- it likely won't work anywhere but the function(s) it was
made to advise.
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