From 2de198e749d5d33364ed535b7756676b98af9bc5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 20 Sep 2019 23:54:17 -0400 Subject: [PATCH] Fix +popup/raise not raising some windows The command now raises the popup into the previously selected window, unless the prefix argument is used. --- modules/ui/popup/autoload/popup.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index cab480ebd..30b948cc6 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -412,9 +412,11 @@ the message buffer in a popup window." t) ;;;###autoload -(defun +popup/raise (window) - "Raise the current popup window into a regular window." - (interactive (list (selected-window))) +(defun +popup/raise (window &optional arg) + "Raise the current popup window into a regular window. +If prefix ARG, raise the current popup into a new window." + (interactive + (list (selected-window) current-prefix-arg)) (cl-check-type window window) (unless (+popup-window-p window) (user-error "Cannot raise a non-popup window")) @@ -422,7 +424,9 @@ the message buffer in a popup window." (+popup--inhibit-transient t) +popup--remember-last) (+popup/close window 'force) - (display-buffer-pop-up-window buffer nil))) + (if arg + (pop-to-buffer buffer) + (switch-to-buffer buffer)))) ;;;###autoload (defun +popup/diagnose ()