diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2021-10-10 20:47:05 (GMT) |
|---|---|---|
| committer | Ravi R Kiran <aine.marina@gmail.com> | 2021-10-10 20:48:37 (GMT) |
| commit | 76069d317e8e026f240b8e142ac7e248f2e323e0 (patch) | |
| tree | ffd766b317737d8c02adac4afb17f33e599613cc /lisp | |
| parent | 6d0dd4793a828fd76ff9efdd15aa0bba9824448b (diff) | |
| download | dotemacs-76069d317e8e026f240b8e142ac7e248f2e323e0.zip dotemacs-76069d317e8e026f240b8e142ac7e248f2e323e0.tar.gz dotemacs-76069d317e8e026f240b8e142ac7e248f2e323e0.tar.bz2 | |
Factor out minibuffer completion system map
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ravi-init-completion.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ravi-init-completion.el b/lisp/ravi-init-completion.el index 76d216c..9159a4c 100644 --- a/lisp/ravi-init-completion.el +++ b/lisp/ravi-init-completion.el @@ -67,6 +67,13 @@ :init (vertico-mode)) +(defun ravi/bind-key-selection-system-map (key func) + "Bind to appropriate minibuffer completion map" + (bind-key key func + (pcase ravi/use-selection-system + ('selectrum selectrum-minibuffer-map) + ('vertico vertico-map)))) + (use-package marginalia :if (member ravi/use-selection-system '(selectrum vertico)) :config (marginalia-mode)) @@ -82,10 +89,7 @@ :init ;; Optionally replace the key help with a completing-read interface (setq prefix-help-command #'embark-prefix-help-command) - (bind-key "C-t" #'embark-act - (pcase ravi/use-selection-system - ('selectrum selectrum-minibuffer-map) - ('vertico vertico-map))) + (ravi/bind-key-selection-system-map "C-t" #'embark-act) :config (defun embark-magit-status (file) "Run `magit-status` on repo containing the embark target." |
