Function: semantic-complete-do-completion
semantic-complete-do-completion is a byte-compiled function defined in
complete.el.gz.
Signature
(semantic-complete-do-completion &optional PARTIAL INLINE)
Documentation
Do a completion for the current minibuffer.
If PARTIAL, do partial completion stopping at spaces. if INLINE, then completion is happening inline in a buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/complete.el.gz
(defun semantic-complete-do-completion (&optional partial _inline)
"Do a completion for the current minibuffer.
If PARTIAL, do partial completion stopping at spaces.
if INLINE, then completion is happening inline in a buffer."
(let* ((collector semantic-completion-collector-engine)
(displayer semantic-completion-display-engine)
(contents (semantic-completion-text))
(ans nil))
(save-excursion
(semantic-collector-calculate-completions collector contents partial))
(let* ((na (semantic-complete-next-action partial)))
(cond
;; We're all done, but only from a very specific
;; area of completion.
((eq na 'done)
(semantic-completion-message " [Complete]")
(setq ans 'done))
;; Perform completion
((or (eq na 'complete)
(eq na 'complete-whitespace))
(semantic-complete-try-completion partial)
(setq ans 'complete))
;; We need to display the completions.
;; Set the completions into the display engine
((or (eq na 'display) (eq na 'displayend))
(semantic-displayer-set-completions
displayer
(or
;; For the below - This caused problems for Chong Yidong
;; when experimenting with the completion engine. I don't
;; remember what the problem was though, and I wasn't sure why
;; the below two lines were there since they obviously added
;; some odd behavior. -EML
;; (and (not (eq na 'displayend))
;; (semantic-collector-current-exact-match collector))
(semantic-collector-all-completions collector contents))
contents)
;; Ask the displayer to display them.
(semantic-displayer-show-request displayer))
((eq na 'scroll)
(semantic-displayer-scroll-request displayer)
)
((eq na 'focus)
(semantic-displayer-focus-next displayer)
(semantic-displayer-focus-request displayer)
)
((eq na 'empty)
(semantic-completion-message " [No Match]"))
(t nil)))
ans))