Like `minibuffer-complete-word' but for `completing-read-multiple'."
(interactive)
(crm--completion-command beg end
- (completion-in-region--single-word
- beg end minibuffer-completion-table minibuffer-completion-predicate)))
+ (completion-in-region--single-word beg end)))
(defun crm-complete-and-exit ()
"If all of the minibuffer elements are valid completions then exit.
Return nil if there is no valid completion, else t."
(interactive)
(completion-in-region--single-word
- (minibuffer--completion-prompt-end) (point-max)
- minibuffer-completion-table minibuffer-completion-predicate))
-
-(defun completion-in-region--single-word (beg end collection
- &optional predicate)
- (let ((minibuffer-completion-table collection)
- (minibuffer-completion-predicate predicate))
- (pcase (completion--do-completion beg end
- #'completion--try-word-completion)
+ (minibuffer--completion-prompt-end) (point-max)))
+
+(defun completion-in-region--single-word (beg end)
+ (pcase (completion--do-completion beg end #'completion--try-word-completion)
(#b000 nil)
- (_ t))))
+ (_ t)))
(defface completions-annotations '((t :inherit (italic shadow)))
"Face to use for annotations in the *Completions* buffer.")