+popup/buffer: hide buffer being popped up #825

This commit is contained in:
Henrik Lissner 2018-08-23 17:12:49 +02:00
parent 641cef9848
commit bfa6fce15f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -279,6 +279,18 @@ Any non-nil value besides the above will be used as the raw value for
;;;###autoload ;;;###autoload
(defalias 'other-popup #'+popup/other) (defalias 'other-popup #'+popup/other)
;;;###autoload
(defun +popup/buffer ()
"Open this buffer in a popup window."
(interactive)
(let ((+popup-default-display-buffer-actions
'(+popup-display-buffer-stacked-side-window))
(display-buffer-alist +popup--display-buffer-alist)
(buffer (current-buffer)))
(push (+popup--make "." +popup-defaults) display-buffer-alist)
(bury-buffer)
(pop-to-buffer buffer)))
;;;###autoload ;;;###autoload
(defun +popup/other () (defun +popup/other ()
"Cycle through popup windows, like `other-window'. Ignores regular windows." "Cycle through popup windows, like `other-window'. Ignores regular windows."