dotfiles/home-manager/modules/emacs/.emacs.d/lisp/auxmenu.el
Magic_RB 519d7b3841
Fill out omen, toothpick and heater
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2023-06-16 16:08:01 +02:00

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