Variable: reftex-cite-cleanup-optional-args
reftex-cite-cleanup-optional-args is a customizable variable defined
in reftex-vars.el.gz.
Value
t
Documentation
Non-nil means, remove unnecessary empty optional arguments in cite macros.
The cite macros provided by some packages (for example
natbib) allow specifying two optional arguments, one for a prefix to
the citation, and a second for a postfix. When only one optional
argument is given, it is interpreted as postfix. When this option is
t, RefTeX removes unnecessary empty optional arguments from the cite
macro before insertion. For example, it will change
\cite[][]{Jones} -> \cite{Jones}
\cite[][Chapter 1]{Jones} -> \cite[Chapter 1]{Jones}
\cite[see][]{Jones} -> \cite[see][]{Jones}
\cite[see][Chapter 1]{Jones} -> \cite{Jones}
It is possible that other packages have other conventions about which
optional argument is interpreted how - that is why this cleaning up
can be turned off.
Probably introduced at or before Emacs version 22.1.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex-vars.el.gz
(defcustom reftex-cite-cleanup-optional-args t
"Non-nil means, remove unnecessary empty optional arguments in cite macros.
The cite macros provided by some packages (for example
natbib) allow specifying two optional arguments, one for a prefix to
the citation, and a second for a postfix. When only one optional
argument is given, it is interpreted as postfix. When this option is
t, RefTeX removes unnecessary empty optional arguments from the cite
macro before insertion. For example, it will change
\\cite[][]{Jones} -> \\cite{Jones}
\\cite[][Chapter 1]{Jones} -> \\cite[Chapter 1]{Jones}
\\cite[see][]{Jones} -> \\cite[see][]{Jones}
\\cite[see][Chapter 1]{Jones} -> \\cite{Jones}
It is possible that other packages have other conventions about which
optional argument is interpreted how - that is why this cleaning up
can be turned off."
:group 'reftex-citation-support
:type 'boolean)