Well, it may be possible, but it depends on how much effort you are willing to put into writing eLisp code to make it work. This is not possible with any configuration option. I would consider an autocomplete extension, adding new sources to it, something like:
(defvar tex-tag-ac-sources '((init . tex-tag-ac-init) (requires . 0) (candidates . tex-tag-ac-candidates) (document . tex-tag-ac-documentation) (match . tex-tag-completion-filter) (prefix . tex-tag-ac-prefix-matcher) (symbol . "s")) "The source generator for autocompletion needed for interaction with auto-complete")
Where tex-tag-ac-candidates , tex-tag-ac-documentation , tex-tag-completion-filter and tex-tag-ac-prefix-matcher are auto-complete functions. That is, the init function is called once when the autofill process for the given prefix begins. It was called without argument. Candidates - this is the function that is responsible for showing the filtered list of candidates, it is called without arguments, you must filter the candidates in the filter function, it is called with the prefix collected so far and the list of candidates so far. Finally, the matcher function is called in the text of the file to find out if completion is required at the point. So, if it returns t , init is called, and then iterates through the selected filter candidates.
As long as this is a little connected ... you will most likely have a completion for everything you want. Obviously, if these functions in the source are defined by you, then if you want, you can dynamically read the completion arguments or generate them dynamically in some way.
And, you should add sources to autocomplete, for example:
(auto-complete (list tex-tag-ac-sources))
if this is done for each call, or
(setq ac-sources (list tex-tag-ac-sources <other sources>))
You can find more information here: http://cx4a.org/software/auto-complete/manual.html#Using_Source
user797257
source share