[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 178/299: Add new possible value for `TeX-insert-macro-default-sty
From: |
Stefan Monnier |
Subject: |
[elpa] 178/299: Add new possible value for `TeX-insert-macro-default-style'. |
Date: |
Sun, 02 Nov 2014 03:11:16 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 66a0dc8cd45bb535384c157a68147d59035405a2
Author: Mosè Giordano <address@hidden>
Date: Sun Oct 6 20:48:54 2013 +0200
Add new possible value for `TeX-insert-macro-default-style'.
* tex.el (TeX-insert-macro-default-style): Add new possible value
`show-all-optional-args' and update doc-string accordingly.
(TeX-parse-arguments): Use it.
* doc/auctex.texi (Completion): Document `show-all-optional-args'.
* doc/changes.texi: Mention `show-all-optional-args'.
---
ChangeLog | 8 ++++++++
doc/auctex.texi | 13 ++++++++-----
doc/changes.texi | 4 +++-
tex.el | 25 ++++++++++++++++---------
4 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4093ce3..1db1fb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2013-10-06 Mos� Giordano <address@hidden>
+ * tex.el (TeX-insert-macro-default-style): Add new possible value
+ `show-all-optional-args' and update doc-string accordingly.
+ (TeX-parse-arguments): Use it.
+
+ * doc/auctex.texi (Completion): Document `show-all-optional-args'.
+
+ * doc/changes.texi: Mention `show-all-optional-args'.
+
* tex.el (TeX-insert-braces-alist): New customizable variable.
(TeX-insert-braces): Mention it in doc-string.
(TeX-parse-macro): Use `TeX-insert-braces-alist'.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 4156a0b..052ca42 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -1063,13 +1063,16 @@ Specifies whether @code{TeX-insert-macro} will ask for
all optional
arguments.
If set to the symbol @code{show-optional-args}, @code{TeX-insert-macro}
-asks for optional arguments of @TeX{} macros. If set to
address@hidden, @code{TeX-insert-macro} asks only for
-mandatory arguments. When @code{TeX-insert-macro} is called with prefix
-argument (@kbd{C-u}), it's the other way round.
+asks for optional arguments of @TeX{} marcos, unless the previous
+optional argument has been rejected. If set to
address@hidden, @code{TeX-insert-macro} asks for all
+optional arguments. @code{mandatory-args-only}, @code{TeX-insert-macro}
+asks only for mandatory arguments. When @code{TeX-insert-macro} is
+called with prefix argument (@kbd{C-u}), it's the other way round.
Note that for some macros, there are special mechanisms, e.g.
address@hidden
address@hidden and
address@hidden
@end defopt
diff --git a/doc/changes.texi b/doc/changes.texi
index df69cb4..183ff82 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -31,7 +31,9 @@ provided as well.
@item
New user options @code{LaTeX-default-author} and
address@hidden
address@hidden A new possible value
+(@code{show-all-optional-args}) for
address@hidden was added.
@item
@samp{biblatex} support was greatly expanded. If parsing is enabled,
diff --git a/tex.el b/tex.el
index 1ab9647..0541acf 100644
--- a/tex.el
+++ b/tex.el
@@ -2611,18 +2611,22 @@ the variable `TeX-insert-braces'."
(defcustom TeX-insert-macro-default-style 'show-optional-args
"Specifies whether `TeX-insert-macro' will ask for all optional arguments.
-If set to the symbol `show-optional-args', `TeX-insert-macro' asks for
-optional arguments of TeX marcos. If set to `mandatory-args-only',
+If set to the symbol `show-optional-args', `TeX-insert-macro'
+asks for optional arguments of TeX marcos, unless the previous
+optional argument has been rejected. If set to
+`show-all-optional-args', `TeX-insert-macro' asks for all
+optional arguments. If set to `mandatory-args-only',
`TeX-insert-macro' asks only for mandatory argument.
When `TeX-insert-macro' is called with \\[universal-argument], it's the other
way round.
Note that for some macros, there are special mechanisms, see e.g.
-`LaTeX-includegraphics-options-alist'."
+`LaTeX-includegraphics-options-alist' and `TeX-arg-cite-note-p'."
:group 'TeX-macro
:type '(choice (const mandatory-args-only)
- (const show-optional-args)))
+ (const show-optional-args)
+ (const show-all-optional-args)))
(defvar TeX-arg-opening-brace nil
"String used as an opening brace for argument insertion.
@@ -2778,11 +2782,14 @@ See `TeX-parse-macro' for details."
(if (vectorp (car args))
;; Maybe get rid of all optional arguments. See `TeX-insert-macro'
;; for more comments. See `TeX-insert-macro-default-style'.
- (unless (or (and (eq TeX-insert-macro-default-style
'show-optional-args)
- (equal current-prefix-arg '(4)))
- (and (eq TeX-insert-macro-default-style
'mandatory-args-only)
- (null (equal current-prefix-arg '(4))))
- last-optional-rejected)
+ (unless (if (eq TeX-insert-macro-default-style
'show-all-optional-args)
+ (equal current-prefix-arg '(4))
+ (or
+ (and (eq TeX-insert-macro-default-style
'show-optional-args)
+ (equal current-prefix-arg '(4)))
+ (and (eq TeX-insert-macro-default-style
'mandatory-args-only)
+ (null (equal current-prefix-arg '(4))))
+ last-optional-rejected))
(let ((TeX-arg-opening-brace LaTeX-optop)
(TeX-arg-closing-brace LaTeX-optcl))
(TeX-parse-argument t (if (equal (length (car args)) 1)
- [elpa] 171/299: * tex-info.el (TeX-texinfo-mode): Set `TeX-sentinel-default-function' to `TeX-TeX-sentinel'., (continued)
- [elpa] 171/299: * tex-info.el (TeX-texinfo-mode): Set `TeX-sentinel-default-function' to `TeX-TeX-sentinel'., Stefan Monnier, 2014/11/01
- [elpa] 172/299: * tex-buf.el (TeX-next-error, TeX-active-buffer): Fix a problem with `TeX-next-error' in multi-file documents., Stefan Monnier, 2014/11/01
- [elpa] 163/299: Don't prompt for reference format when RefTeX is active., Stefan Monnier, 2014/11/01
- [elpa] 173/299: Fix unit name in siunitx style file., Stefan Monnier, 2014/11/01
- [elpa] 180/299: fix author in ChangeLog, Stefan Monnier, 2014/11/01
- [elpa] 175/299: Detect a couple of hyperref rerun messages., Stefan Monnier, 2014/11/01
- [elpa] 174/299: Enhance brace pairing feature., Stefan Monnier, 2014/11/01
- [elpa] 176/299: Fix in TeX-arg-insert-braces. Again., Stefan Monnier, 2014/11/01
- [elpa] 181/299: Fix typos., Stefan Monnier, 2014/11/01
- [elpa] 179/299: Docs for paired braces feature., Stefan Monnier, 2014/11/01
- [elpa] 178/299: Add new possible value for `TeX-insert-macro-default-style'.,
Stefan Monnier <=
- [elpa] 177/299: Add new customizable variable TeX-insert-braces-alist., Stefan Monnier, 2014/11/01
- [elpa] 182/299: Add indentation for tabular environment., Stefan Monnier, 2014/11/01
- [elpa] 183/299: Use enhanced tabular indentation for more envs., Stefan Monnier, 2014/11/01
- [elpa] 187/299: Fix in biblatex style file., Stefan Monnier, 2014/11/01
- [elpa] 188/299: Really fix bug in biblatex style file., Stefan Monnier, 2014/11/01
- [elpa] 189/299: Run style files of the bibliography files when inserting bibliography macros., Stefan Monnier, 2014/11/01
- [elpa] 186/299: Add narrowing commands., Stefan Monnier, 2014/11/01
- [elpa] 190/299: Document missing folding variables., Stefan Monnier, 2014/11/01
- [elpa] 193/299: void-function error fix., Stefan Monnier, 2014/11/01
- [elpa] 184/299: Mention new tabular indentation in changes.texi., Stefan Monnier, 2014/11/01