diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index a371a8e14de..d442d74f030 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -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