Function: reftex-format-special
reftex-format-special is a byte-compiled function defined in
reftex-ref.el.gz.
Signature
(reftex-format-special LABEL FMT REFSTYLE)
Documentation
Apply selected reference style to format FMT and add LABEL.
Replace any occurrences of "\\ref" with REFSTYLE.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex-ref.el.gz
(defun reftex-format-special (label fmt refstyle)
"Apply selected reference style to format FMT and add LABEL.
Replace any occurrences of \"\\ref\" with REFSTYLE."
;; Replace instances of \ref in `fmt' with the special reference
;; style selected by the user.
(cond
((while (let ((case-fold-search nil))
(string-match "\\(\\\\ref\\)[ \t]*{" fmt))
(setq fmt (replace-match refstyle t t fmt 1))))
((string-match "\\(\\\\[[:alpha:]]+\\)[ \t]*{" fmt)
(setq fmt (replace-match refstyle t t fmt 1))))
(format fmt label))