branch: externals/auctex
commit 0e54895842d0fce456f4f16eac3869a7b67765bd
Author: Tassilo Horn <[email protected]>
Commit: Tassilo Horn <[email protected]>
Improve completion docs
* doc/auctex.texi (Completion): Improved docs.
* doc/changes.texi: Mention math completion, add link to Completion node
in the manual.
* tex.el (TeX-complete-list): Improve docstring.
---
doc/auctex.texi | 4 ++--
doc/changes.texi | 7 +++++++
tex.el | 3 ++-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 87233f1..172b5f8 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -1245,7 +1245,8 @@ Each entry is a list with the following elements:
@enumerate
@item
-Regexp matching the preceding text.
+Regexp matching the preceding text or a predicate of arity 0 which
+returns non-nil and sets `match-data' appropriately if it is applicable.
@item
A number indicating the subgroup in the regexp containing the text.
@item
@@ -1315,7 +1316,6 @@ called with prefix argument (@kbd{C-u}), it's the other
way round.
Note that for some macros, there are special mechanisms, e.g.
@code{LaTeX-includegraphics-options-alist} and
@code{TeX-arg-cite-note-p}.
-
@end defopt
diff --git a/doc/changes.texi b/doc/changes.texi
index e756d96..c737a7f 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -17,6 +17,13 @@ In addition to the completion performed by
@code{TeX-complete-symbol},
facility (see the Emacs command @code{completion-at-point}). This also
means that modern completion UIs like @i{company-mode} work out of the
box in @TeX{} and @LaTeX{} buffers.
+@ifclear rawfile
+@xref{Completion}, for details.
+@end ifclear
+
+@item
+Completion is now aware of being inside a math environment and then
+completes math macros.
@item
@AUCTeX{} is able to display several levels of super- and subscripts,
diff --git a/tex.el b/tex.el
index 2eb8536..02946b9 100644
--- a/tex.el
+++ b/tex.el
@@ -3144,7 +3144,8 @@ Expert %s are completed depending on
`TeX-complete-expert-commands'."
Each entry is a list with the following elements:
0. Regexp matching the preceding text or a predicate of arity 0
-which checks its applicability and sets `match-data'.
+which returns non-nil and sets `match-data' appropriately if it
+is applicable.
1. A number indicating the subgroup in the regexp containing the
text.
2. A function returning an alist of possible completions.