[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2a65fac9: Return correct completion candidates in math-mode
From: |
Arash Esbati |
Subject: |
master 2a65fac9: Return correct completion candidates in math-mode |
Date: |
Fri, 17 Mar 2023 05:40:28 -0400 (EDT) |
branch: master
commit 2a65fac9b17a81fdbcad1e71ef9537771809354b
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Return correct completion candidates in math-mode
* latex.el (LaTeX-common-initialization): Make sure that from the
second elements inside `LaTeX-math-list' and `LaTeX-math-default',
only the strings are used for `TeX-complete-list'. The second
element can also be a function which is not correct for completion
purposes. (bug#62220)
---
latex.el | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/latex.el b/latex.el
index 7306fcc4..9bf48144 100644
--- a/latex.el
+++ b/latex.el
@@ -8073,8 +8073,9 @@ function would return non-nil and `(match-string 1)'
would return
2 LaTeX-pagestyle-list "}")
(LaTeX--after-math-macro-prefix-p
1 (lambda ()
- (append (mapcar #'cadr LaTeX-math-list)
- (mapcar #'cadr LaTeX-math-default)))
+ (seq-filter #'stringp
+ (append (mapcar #'cadr LaTeX-math-list)
+ (mapcar #'cadr
LaTeX-math-default))))
(if TeX-insert-braces "{}")))
TeX-complete-list))
@@ -8178,15 +8179,15 @@ function would return non-nil and `(match-string 1)'
would return
[ TeX-arg-corner ] t)
'("frame" t)
'("framebox" (TeX-arg-conditional
- (string-equal (LaTeX-current-environment) "picture")
- (TeX-arg-size [ TeX-arg-corner ] t)
- ([ "Length" ] [ TeX-arg-lr ] t)))
+ (string-equal (LaTeX-current-environment) "picture")
+ (TeX-arg-size [ TeX-arg-corner ] t)
+ ([ "Length" ] [ TeX-arg-lr ] t)))
'("line" (TeX-arg-pair "X slope" "Y slope") "Length")
'("linethickness" "Dimension")
'("makebox" (TeX-arg-conditional
- (string-equal (LaTeX-current-environment) "picture")
- (TeX-arg-size [ TeX-arg-corner ] t)
- ([ "Length" ] [ TeX-arg-lr ] t)))
+ (string-equal (LaTeX-current-environment) "picture")
+ (TeX-arg-size [ TeX-arg-corner ] t)
+ ([ "Length" ] [ TeX-arg-lr ] t)))
'("multiput"
TeX-arg-coordinate
(TeX-arg-pair "X delta" "Y delta")
@@ -8196,9 +8197,9 @@ function would return non-nil and `(match-string 1)'
would return
'("put" TeX-arg-coordinate t)
'("savebox" TeX-arg-savebox
(TeX-arg-conditional
- (string-equal (LaTeX-current-environment) "picture")
- (TeX-arg-size [ TeX-arg-corner ] t)
- ([ "Length" ] [ TeX-arg-lr ] t)))
+ (string-equal (LaTeX-current-environment) "picture")
+ (TeX-arg-size [ TeX-arg-corner ] t)
+ ([ "Length" ] [ TeX-arg-lr ] t)))
'("shortstack" [ TeX-arg-lr ] t)
'("vector" (TeX-arg-pair "X slope" "Y slope") "Length")
'("cline" "Span `i-j'")
@@ -8207,8 +8208,8 @@ function would return non-nil and `(match-string 1)'
would return
(TeX-arg-conditional (or TeX-arg-item-label-p
(string-equal (LaTeX-current-environment)
"description"))
- ([ "Item label" ])
- ())
+ ([ "Item label" ])
+ ())
(TeX-arg-literal " "))
'("bibitem" [ "Bibitem label" ] TeX-arg-define-cite)
'("cite"
@@ -8607,13 +8608,13 @@ function would return non-nil and `(match-string 1)'
would return
'("RequirePackage" LaTeX-arg-usepackage)
'("ProvidesPackage" (TeX-arg-file-name-sans-extension "Package name")
[ TeX-arg-conditional (y-or-n-p "Insert version? ")
- ([ TeX-arg-version ]) nil])
+ ([ TeX-arg-version ]) nil])
'("ProvidesClass" (TeX-arg-file-name-sans-extension "Class name")
[ TeX-arg-conditional (y-or-n-p "Insert version? ")
- ([ TeX-arg-version ]) nil])
+ ([ TeX-arg-version ]) nil])
'("ProvidesFile" (TeX-arg-file-name "File name")
[ TeX-arg-conditional (y-or-n-p "Insert version? ")
- ([ TeX-arg-version ]) nil ])
+ ([ TeX-arg-version ]) nil ])
'("documentclass" TeX-arg-document)))
(TeX-add-style-hook "latex2e"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 2a65fac9: Return correct completion candidates in math-mode,
Arash Esbati <=