Variable: reftex-format-ref-function

reftex-format-ref-function is a customizable variable defined in reftex-vars.el.gz.

Value

nil

Documentation

Function which produces the string to insert as a reference.

Normally should be nil, because the format to insert a reference can already be specified in reftex-label-alist.

This hook also is used by the special commands to insert e.g. \vref and \fref references, so even if you set this, your setting will be ignored by the special commands.

The function will be called with three arguments, the LABEL, the DEFAULT FORMAT, which normally is ~\ref{%s} and the REFERENCE STYLE. The function should return the string to insert into the buffer.

Probably introduced at or before Emacs version 20.3.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-vars.el.gz
;;;###autoload(put 'reftex-guess-label-type 'safe-local-variable (lambda (x) (memq x '(nil t))))

(defcustom reftex-format-ref-function nil
  "Function which produces the string to insert as a reference.
Normally should be nil, because the format to insert a reference
can already be specified in `reftex-label-alist'.

This hook also is used by the special commands to insert
e.g. `\\vref' and `\\fref' references, so even if you set this,
your setting will be ignored by the special commands.

The function will be called with three arguments, the LABEL, the
DEFAULT FORMAT, which normally is `~\\ref{%s}' and the REFERENCE
STYLE.  The function should return the string to insert into the
buffer."
  :group 'reftex-referencing-labels
  :type '(choice (const nil) function))