Function: crm-complete-and-exit
crm-complete-and-exit is an interactive and byte-compiled function
defined in crm.el.gz.
Signature
(crm-complete-and-exit &optional NO-EXIT)
Documentation
Exit if all of the minibuffer elements are valid completions.
Otherwise, try to complete the minibuffer contents.
This behaves like minibuffer-complete-and-exit (which see),
adjusted for the presence of multiple elements.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/crm.el.gz
(defun crm-complete-and-exit (&optional no-exit)
"Exit if all of the minibuffer elements are valid completions.
Otherwise, try to complete the minibuffer contents.
This behaves like `minibuffer-complete-and-exit' (which see),
adjusted for the presence of multiple elements."
(interactive "P")
(when (completion--selected-candidate)
(minibuffer-choose-completion t t))
(let ((doexit (not no-exit)))
(goto-char (minibuffer-prompt-end))
(while
(and doexit
(crm--completion-command beg end
(let ((end (copy-marker end t)))
(goto-char end)
(setq doexit nil)
(completion-complete-and-exit beg end
(lambda () (setq doexit t)))
(goto-char end)
(not (eobp))))
(looking-at crm-separator))
;; Skip to the next element.
(goto-char (match-end 0)))
(if doexit (exit-minibuffer))))