diff --git a/lisp/transient.el b/lisp/transient.el index 911a34d..08c3bfc 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -681,6 +681,7 @@ If `transient-save-history' is nil, then do nothing." (transient-suffix :initarg :transient-suffix :initform nil) (transient-non-suffix :initarg :transient-non-suffix :initform nil) (transient-switch-frame :initarg :transient-switch-frame) + (display-action :initarg :display-action :initform nil) (refresh-suffixes :initarg :refresh-suffixes :initform nil) (environment :initarg :environment :initform nil) (incompatible :initarg :incompatible :initform nil) @@ -3856,12 +3857,9 @@ have a history of their own.") (when-let ((line (transient--separator-line))) (insert line))) (unless (window-live-p transient--window) - (when (eq (car transient-display-buffer-action) - 'display-buffer-full-frame) - (user-error "Invalid value for `transient-display-buffer-action'")) (setq transient--window (display-buffer transient--buffer - transient-display-buffer-action))) + (transient--display-action)))) (when (window-live-p transient--window) (with-selected-window transient--window (set-window-parameter nil 'prev--no-other-window @@ -3872,6 +3870,13 @@ have a history of their own.") (transient--goto-button focus)) (transient--fit-window-to-buffer transient--window))))) +(defun transient--display-action () + (let ((action (or (oref transient--prefix display-action) + transient-display-buffer-action))) + (when (eq (car action) 'display-buffer-full-frame) + (user-error "Invalid value for `transient-display-buffer-action'")) + action)) + (defun transient--fit-window-to-buffer (window) (let ((window-resize-pixelwise t) (window-size-fixed nil))