- 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>`
- before this change: when reusing a window, select option would get ignored
- after this change: when reusing a window, select option would be used
just as a new popup
process, timer, abbreviations, output, occur buffers are all better
displayed in a maximized fashion. Otherwise, they aren't really useful.
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
The popup manager (by default) auto-kills most popup buffers after
~5s (controlled by the :ttl property). However, when backtrace buffers
are killed, it calls `top-level`. When the popup manager kills the
buffer, this causes janky cursor movement and the message "Back to top
level" to be displayed in the minibuffer.
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 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"))
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.