auctex-diffs
[Top][All Lists]
Advanced

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

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


From: Tassilo Horn
Subject: [AUCTeX-diffs] Changes to auctex/latex.el,v
Date: Thu, 07 Mar 2013 09:21:41 +0000

CVSROOT:        /sources/auctex
Module name:    auctex
Changes by:     Tassilo Horn <tsdh>     13/03/07 09:21:40

Index: latex.el
===================================================================
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.489
retrieving revision 5.490
diff -u -b -r5.489 -r5.490
--- latex.el    6 Mar 2013 11:56:10 -0000       5.489
+++ latex.el    7 Mar 2013 09:21:40 -0000       5.490
@@ -2121,6 +2121,19 @@
                   TeX-left-right-braces)))
        (indent-according-to-mode)))))
 
+(defun TeX-read-key-val (optional key-val-alist)
+  "Prompt for keys and values in KEY-VAL-ALIST and return them.
+If OPTIONAL is non-nil, indicate in the prompt that we are
+reading an optional argument.  KEY-VAL-ALIST is an alist.  The
+car of each element should be a string representing a key and the
+optional cdr should be a list with strings to be used as values
+for the key."
+  (multi-prompt-key-value
+   (TeX-argument-prompt optional "Options (k=v)" nil)
+   (if (symbolp key-val-alist)
+       (eval key-val-alist)
+     key-val-alist)))
+
 (defun TeX-arg-key-val (optional key-val-alist)
   "Prompt for keys and values in KEY-VAL-ALIST.
 Insert the given value as a TeX macro argument.  If OPTIONAL is
@@ -2128,11 +2141,7 @@
 alist.  The car of each element should be a string representing a
 key and the optional cdr should be a list with strings to be used
 as values for the key."
-  (let ((options (multi-prompt-key-value
-                 (TeX-argument-prompt optional "Options (k=v)" nil)
-                 (if (symbolp key-val-alist)
-                     (eval key-val-alist)
-                   key-val-alist))))
+  (let ((options (TeX-read-key-val optional key-val-alist)))
     (TeX-argument-insert options optional)))
 
 



reply via email to

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