branch: externals/auctex commit 37e5a450a34a7faadd4c92a7aae9246fb1894b57 Author: Tassilo Horn <t...@gnu.org> Commit: Tassilo Horn <t...@gnu.org>
Complete LaTeX lengths and counters * tex.el: (VirTeX-common-initialization): Complete LaTeX lengths and counters. --- tex.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tex.el b/tex.el index b881e91c45..13f72db465 100644 --- a/tex.el +++ b/tex.el @@ -3752,12 +3752,18 @@ The algorithm is as follows: ;; (make-display-table))) ;; (aset buffer-display-table ?\t (apply 'vector (append "<TAB>" nil))) - ;; Symbol completion. - (set (make-local-variable 'TeX-complete-list) - (list (list "\\\\\\([a-zA-Z]*\\)" - 1 'TeX-symbol-list-filtered - (if TeX-insert-braces "{}")) - (list "" TeX-complete-word))) + ;; Symbol & length completion. + (setq-local TeX-complete-list + (list (list "\\\\\\([a-zA-Z]*\\)" + 1 + (lambda () + (append (TeX-symbol-list-filtered) + (when (fboundp #'LaTeX-length-list) + (LaTeX-length-list)) + (when (fboundp #'LaTeX-counter-list) + (LaTeX-counter-list)))) + (if TeX-insert-braces "{}")) + (list "" TeX-complete-word))) (funcall TeX-install-font-lock)