auctex-commit
[Top][All Lists]
Advanced

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

[AUCTeX-commit] Changes to auctex/latex.el,v


From: Ralf Angeli
Subject: [AUCTeX-commit] Changes to auctex/latex.el,v
Date: Mon, 23 Apr 2007 18:54:34 +0000

CVSROOT:        /cvsroot/auctex
Module name:    auctex
Changes by:     Ralf Angeli <angeli>    07/04/23 18:54:34

Index: latex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.434
retrieving revision 5.435
diff -u -b -r5.434 -r5.435
--- latex.el    16 Apr 2007 16:57:12 -0000      5.434
+++ latex.el    23 Apr 2007 18:54:34 -0000      5.435
@@ -558,16 +558,19 @@
               (setq args (concat args TeX-grop TeX-grcl))
               (setq count (- count 1)))
             (LaTeX-insert-environment environment args)))
-         ((stringp (nth 1 entry))
+         ((or (stringp (nth 1 entry)) (vectorp (nth 1 entry)))
           (let ((prompts (cdr entry))
                 (args ""))
-            (while prompts
+            (dolist (elt prompts)
+              (let* ((optional (vectorp elt))
+                     (elt (if optional (elt elt 0) elt))
+                     (arg (read-string (concat (when optional "(Optional) ")
+                                               elt ": "))))
               (setq args (concat args
-                                 TeX-grop
-                                 (read-from-minibuffer
-                                  (concat (car prompts) ": "))
-                                 TeX-grcl))
-              (setq prompts (cdr prompts)))
+                                   (cond ((and optional (> (length arg) 0))
+                                          (concat LaTeX-optop arg LaTeX-optcl))
+                                         ((not optional)
+                                          (concat TeX-grop arg TeX-grcl)))))))
             (LaTeX-insert-environment environment args)))
          (t
           (apply (nth 1 entry) environment (nthcdr 2 entry))))))




reply via email to

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