*Help*
windows appear to have a special behavior. For example, if I open a help window using C-h f butterfly
, the window will open in a separate half-page buffer. If I use the help feature again C-h f tetris
, the same help-mode buffer will be reused to display the documentation for tetris
. Is there a way to replicate this behavior for other windows? For example, I would like EWW windows to have a behavior similar to *Help*
.
So far, I have this:
;; Reuse old *eww* windows.
;; Otherwise, pop up a new window.
(setq-default display-buffer-alist
(cons '("^\\*\\eww\\*$"
(display-buffer-reuse-window
display-buffer-pop-up-window))
display-buffer-alist))
Is this method correct? I feel uneasy about the use of the use of regex to drive the behavior. Perhaps there is some other way of achieving the same result (e.g. using advice-add
)?