mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-02 13:06:11 +01:00
519d7b3841
Signed-off-by: Magic_RB <magic_rb@redalder.org>
37 lines
1.2 KiB
EmacsLisp
37 lines
1.2 KiB
EmacsLisp
;;; package --- Summary:
|
|
;;; Commentary:
|
|
;;; Code:
|
|
|
|
(defvar auxmenu-frame-alist nil)
|
|
|
|
(defun auxmenu-popup-frame (prompt collection display width height &rest args)
|
|
""
|
|
(let ((frame (alist-get display auxmenu-frame-alist)))
|
|
(when (equal frame nil)
|
|
(when (equal display nil)
|
|
(error "Must specify display"))
|
|
|
|
(push `(,display . ,(make-frame
|
|
`((minibuffer . only)
|
|
(name . "emacs-completing-read-float")
|
|
(unsplittable . t)
|
|
(no-other-frame . t)
|
|
(width . ,width)
|
|
(height . ,height)
|
|
(display . ,display)
|
|
(left . 0.5)
|
|
(top . 0.5))))
|
|
auxmenu-frame-alist)
|
|
(setq frame (alist-get display auxmenu-frame-alist)))
|
|
(make-frame-visible frame)
|
|
(raise-frame frame)
|
|
(with-selected-frame frame
|
|
(unwind-protect
|
|
(let ((selection (apply #'completing-read prompt collection args)))
|
|
(make-frame-invisible frame)
|
|
selection)
|
|
(make-frame-invisible frame)))))
|
|
|
|
(provide 'auxmenu)
|
|
;;; auxmenu.el ends here
|