Function: dirvish-save-dedication

dirvish-save-dedication is a macro defined in dirvish.el.

Signature

(dirvish-save-dedication &rest BODY)

Documentation

Run BODY after undedicating window, restore dedication afterwards.

Source Code

;; Defined in /nix/store/1gijwny2yx4fggrsb9l110h1ybs1gdk5-emacs-packages-deps/share/emacs/site-lisp/elpa/dirvish-20260725.1520/dirvish.el
(defmacro dirvish-save-dedication (&rest body)
  "Run BODY after undedicating window, restore dedication afterwards."
  (declare (debug (&rest form)))
  `(let* ((w (selected-window)) (ded (window-dedicated-p w)))
     (set-window-dedicated-p w nil)
     (prog1 ,@body (and (window-live-p w) (set-window-dedicated-p w ded)))))