Function: semantic-complete-next-action
semantic-complete-next-action is a byte-compiled function defined in
complete.el.gz.
Signature
(semantic-complete-next-action PARTIAL)
Documentation
Determine what the next completion action should be.
PARTIAL is non-nil if we are doing partial completion.
First, the collector can determine if we should perform a completion or not.
If there is nothing to complete, then the displayer determines if we are
to show a completion list, scroll, or perhaps do a focus (if it is capable.)
Expected return values are:
done -> We have a singular match
empty -> There are no matches to the current text
complete -> Perform a completion action
complete-whitespace -> Complete next whitespace type character.
display -> Show the list of completions
scroll -> The completions have been shown, and the user keeps hitting
the complete button. If possible, scroll the completions
focus -> The displayer knows how to shift focus among possible completions.
Let it do that.
displayend -> Whatever options the displayer had for repeating options, there
are none left. Try something new.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/complete.el.gz
;;; ------------------------------------------------------------
;;; Interactions between collection and displaying
;;
;; Functional routines used to help collectors communicate with
;; the current displayer, or for the previous section.
(defun semantic-complete-next-action (partial)
"Determine what the next completion action should be.
PARTIAL is non-nil if we are doing partial completion.
First, the collector can determine if we should perform a completion or not.
If there is nothing to complete, then the displayer determines if we are
to show a completion list, scroll, or perhaps do a focus (if it is capable.)
Expected return values are:
done -> We have a singular match
empty -> There are no matches to the current text
complete -> Perform a completion action
complete-whitespace -> Complete next whitespace type character.
display -> Show the list of completions
scroll -> The completions have been shown, and the user keeps hitting
the complete button. If possible, scroll the completions
focus -> The displayer knows how to shift focus among possible completions.
Let it do that.
displayend -> Whatever options the displayer had for repeating options, there
are none left. Try something new."
(let ((ans1 (semantic-collector-next-action
semantic-completion-collector-engine
partial))
(ans2 (semantic-displayer-next-action
semantic-completion-display-engine))
)
(cond
;; No collector answer, use displayer answer.
((not ans1)
ans2)
;; Displayer selection of 'scroll, 'display, or 'focus trumps
;; 'done
((and (eq ans1 'done) ans2)
ans2)
;; Use ans1 when we have it.
(t
ans1))))