emacs: remove vertico-specific tweak for prot-window-popup commands

It is a good idea, but ultimately not needed.
This commit is contained in:
Protesilaos Stavrou 2025-02-16 11:04:15 +02:00
parent 0e0fe81a58
commit 150a2622f4
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
2 changed files with 0 additions and 50 deletions

View file

@ -16958,31 +16958,6 @@ Else do `vertico-exit'."
(t
(vertico-exit))))
;; I want to keep `prot-window-define-with-popup-frame' as-is because
;; it is useful for other users as well. But I also wish to extend it
;; to make Vertico use its buffer mode, if I am running Vertico. So I
;; do this with an advice even though the proper way would be to
;; modify my macro directly.
(defun prot-vertico-with-buffer-mode (&rest args)
"Apply ARGS with `vertico-buffer-mode' enabled.
Do so when `prot-emacs-completion-ui' is set to use Vertico.
Add this function as an advice around another."
(when (eq prot-emacs-completion-ui 'vertico)
(unwind-protect
(progn
(let ((vertico-multiform-categories `((t ,@prot-vertico-multiform-maximal)))
(vertico-buffer-display-action '(display-buffer-full-frame)))
(vertico-buffer-mode 1)
(apply args)))
(vertico-buffer-mode -1))))
(with-eval-after-load 'prot-window
(dolist (command '(prot-window-popup-org-capture
prot-window-popup-tmr
prot-window-popup-prot-project-switch))
(advice-add command :around #'prot-vertico-with-buffer-mode)))
(provide 'prot-vertico)
;;; prot-vertico.el ends here
#+end_src

View file

@ -123,30 +123,5 @@ Else do `vertico-exit'."
(t
(vertico-exit))))
;; I want to keep `prot-window-define-with-popup-frame' as-is because
;; it is useful for other users as well. But I also wish to extend it
;; to make Vertico use its buffer mode, if I am running Vertico. So I
;; do this with an advice even though the proper way would be to
;; modify my macro directly.
(defun prot-vertico-with-buffer-mode (&rest args)
"Apply ARGS with `vertico-buffer-mode' enabled.
Do so when `prot-emacs-completion-ui' is set to use Vertico.
Add this function as an advice around another."
(when (eq prot-emacs-completion-ui 'vertico)
(unwind-protect
(progn
(let ((vertico-multiform-categories `((t ,@prot-vertico-multiform-maximal)))
(vertico-buffer-display-action '(display-buffer-full-frame)))
(vertico-buffer-mode 1)
(apply args)))
(vertico-buffer-mode -1))))
(with-eval-after-load 'prot-window
(dolist (command '(prot-window-popup-org-capture
prot-window-popup-tmr
prot-window-popup-prot-project-switch))
(advice-add command :around #'prot-vertico-with-buffer-mode)))
(provide 'prot-vertico)
;;; prot-vertico.el ends here