completing-read-multiple: Fix support for ":" as separator

* lisp/emacs-lisp/crm.el (completing-read-multiple):
Do not search for separators inside the prompt (bug#76461).
This commit is contained in:
Dmitry Gutov 2025-03-02 05:13:14 +02:00
parent 38cc36a375
commit 8091772767

View file

@ -253,7 +253,9 @@ with empty strings removed."
(setq-local completion-list-insert-choice-function
(lambda (_start _end choice)
(let* ((beg (save-excursion
(if (search-backward-regexp crm-separator nil t)
(if (search-backward-regexp crm-separator
(field-beginning)
t)
(1+ (point))
(minibuffer-prompt-end))))
(end (save-excursion