emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 37e5a450a3 20/77: Complete LaTeX lengths and cou


From: Tassilo Horn
Subject: [elpa] externals/auctex 37e5a450a3 20/77: Complete LaTeX lengths and counters
Date: Fri, 26 Aug 2022 16:06:33 -0400 (EDT)

branch: externals/auctex
commit 37e5a450a34a7faadd4c92a7aae9246fb1894b57
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@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)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]