Skip to content

Commit 02cd1a0

Browse files
committed
tweak(crm): indicate in the prompt about completing-read-multiple
1 parent 786a089 commit 02cd1a0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/me-builtin.el

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,15 @@ or file path may exist now."
231231
;; Do not allow the cursor in the minibuffer prompt (goes with `cursor-intangible-mode')
232232
(minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)))
233233

234+
(use-package crm
235+
:config
236+
;; From: https://github.com/a-schaefers/spartan-emacs/blob/main/spartan-layers/spartan-vertico.el
237+
;; Add prompt indicator to `completing-read-multiple'. We display [CRM<separator>], e.g., [CRM,] if the separator is a comma.
238+
(advice-add
239+
#'completing-read-multiple :filter-args
240+
(satch-defun +crm--indicator:filter-args-a (args)
241+
(cons (format "[CRM%s] %s" (replace-regexp-in-string "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" "" crm-separator) (car args)) (cdr args)))))
242+
234243
(use-package transient
235244
:straight t
236245
:autoload transient-define-prefix transient-define-infix transient-define-suffix

0 commit comments

Comments
 (0)