branch: master
commit 4666795a8f6f5e5b436629b9828c77aad4477789
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>

    Drop usage of `LaTeX-env-contents'
    
    * latex.el (LaTeX-common-initialization): Drop
    `LaTeX-env-contents' and use the new way of query for arguments.
    This allows in-buffer completion for the optional argument.
---
 latex.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/latex.el b/latex.el
index acdb5f73..af9bc6be 100644
--- a/latex.el
+++ b/latex.el
@@ -8758,8 +8758,14 @@ function would return non-nil and `(match-string 1)' 
would return
 
   (when (string-equal LaTeX-version "2e")
     (LaTeX-add-environments
-     '("filecontents" LaTeX-env-contents)
-     '("filecontents*" LaTeX-env-contents))
+     '("filecontents" LaTeX-env-args
+       [TeX-arg-completing-read-multiple
+        ("overwrite" "force" "nosearch" "nowarn" "noheader")]
+       "File")
+     '("filecontents*" LaTeX-env-args
+       [TeX-arg-completing-read-multiple
+        ("overwrite" "force" "nosearch" "nowarn")]
+       "File"))
 
     (TeX-add-symbols
      '("enlargethispage"  (TeX-arg-length nil "1.0\\baselineskip"))

Reply via email to