Add small utility to zoom into dedicated window

Taken from prot, see comment.
This commit is contained in:
Daniel Borchmann 2024-12-30 10:39:29 +01:00
parent d2ae0e1bf5
commit ae5657fcc9
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625

View File

@ -637,6 +637,20 @@ quite sure whether something like this exists already?"
(funcall entry)
entry)))
;; From https://protesilaos.com/codelog/2020-08-03-emacs-custom-functions-galore/, where it has been
;; based on `windower' by Pierre Neidhardt (ambrevar on GitLab); pointer by
;; https://sachachua.com/blog/2024/12/emacs-tv/
(let (saved-window-configuration)
(define-minor-mode db/window-single-toggle
"Toggle between multiple windows and single window."
:lighter " Z"
:global nil
(if (one-window-p)
(when saved-window-configuration
(set-window-configuration saved-window-configuration))
(setq saved-window-configuration (current-window-configuration))
(delete-other-windows))))
;;; Base45 Decoding