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)
Documentation
If all of the minibuffer elements are valid completions then exit.
All elements in the minibuffer must match. If there is a mismatch, move point to the location of mismatch and do not exit.
This function is modeled after minibuffer-complete-and-exit.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/crm.el.gz
(defun crm-complete-and-exit ()
"If all of the minibuffer elements are valid completions then exit.
All elements in the minibuffer must match. If there is a mismatch, move point
to the location of mismatch and do not exit.
This function is modeled after `minibuffer-complete-and-exit'."
(interactive)
(let ((doexit t))
(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))))