Function: semantic-analyze-possible-completions-texinfo-mode
semantic-analyze-possible-completions-texinfo-mode is a byte-compiled
function defined in texi.el.gz.
Signature
(semantic-analyze-possible-completions-texinfo-mode CONTEXT &rest FLAGS)
Documentation
List smart completions at point.
Since texinfo is not a programming language the default version is not
useful. Instead, look at the current symbol. If it is a command
do primitive texinfo built ins. If not, use ispell to lookup words
that start with that symbol.
Override semantic-analyze-possible-completions in texinfo-mode
buffers.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/texi.el.gz
(define-mode-local-override semantic-analyze-possible-completions
texinfo-mode (context &rest _flags)
"List smart completions at point.
Since texinfo is not a programming language the default version is not
useful. Instead, look at the current symbol. If it is a command
do primitive texinfo built ins. If not, use ispell to lookup words
that start with that symbol."
(let ((prefix (car (oref context prefix)))
)
(cond ((member 'function (oref context prefixclass))
;; Do completion for texinfo commands
(let* ((cmd (substring prefix 1))
(lst (all-completions
cmd semantic-texi-command-completion-list)))
(mapcar (lambda (f) (semantic-tag (concat "@" f) 'function))
lst))
)
((member 'word (oref context prefixclass))
;; Do completion for words via ispell.
(require 'ispell)
(let ((word-list (ispell-lookup-words prefix)))
(mapcar (lambda (f) (semantic-tag f 'word)) word-list))
)
(t nil))
))