auctex-diffs
[Top][All Lists]
Advanced

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

master 49987f08 5/5: Provide completion candidates for `TeX-arg-length'


From: Arash Esbati
Subject: master 49987f08 5/5: Provide completion candidates for `TeX-arg-length'
Date: Fri, 4 Nov 2022 08:26:18 -0400 (EDT)

branch: master
commit 49987f08dde1329dac32385b5623cd2cdbeb8873
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Provide completion candidates for `TeX-arg-length'
    
    * latex.el (LaTeX-completion-function-map-alist-cr): Add entry for
    `TeX-arg-length' and the corresponding mapping function.
    Adjust docstring.
---
 latex.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/latex.el b/latex.el
index 20a337c5..79b25f4d 100644
--- a/latex.el
+++ b/latex.el
@@ -7542,20 +7542,23 @@ or `LaTeX-environment-list' and returns it."
   "Alist mapping style funcs to completion-candidates counterparts.
 Each element is a cons with the name of the function used in an
 AUCTeX style file which queries and inserts something in the
-buffer as car and the name function delievering completion
-candidates as cdr.  This list contains only mapping for functions
-which perform key=val completions.  See also
+buffer as car and a function delievering completion candidates as
+cdr.  This list contains only mapping for functions which perform
+key=val completions.  See also
 `LaTeX-completion-function-map-alist-cr'.")
 
 (defvar LaTeX-completion-function-map-alist-cr
-  '((TeX-arg-counter . LaTeX-counter-list)
-    (TeX-arg-pagestyle . LaTeX-pagestyle-list) )
+  `((TeX-arg-counter . LaTeX-counter-list)
+    (TeX-arg-pagestyle . LaTeX-pagestyle-list)
+    (TeX-arg-length . ,(lambda () (mapcar (lambda (x)
+                                            (concat TeX-esc (car x)))
+                                          (LaTeX-length-list)))))
   "Alist mapping style funcs to completion-candidates counterparts.
 Each element is a cons with the name of the function used in an
 AUCTeX style file which queries and inserts something in the
-buffer as car and the name function delievering completion
-candidates as cdr.  This list contains only mapping for functions
-which perform completing-read.  See also
+buffer as car and a function delievering completion candidates as
+cdr.  This list contains only mapping for functions which perform
+completing-read.  See also
 `LaTeX-completion-function-map-alist-keyval'.")
 
 (defun LaTeX-completion-parse-arg (arg)



reply via email to

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