(put 'funref 'latexinfo-format 'latexinfo-format-funref)
(put 'macref 'latexinfo-format 'latexinfo-format-funref)
(put 'specref 'latexinfo-format 'latexinfo-format-funref)
(defun latexinfo-format-funref ()
  (let ((arg  (latexinfo-parse-arg-discard)))
    (insert arg " ")
    (latexinfo-format-fref arg)))

(defun latexinfo-format-fref (arg)
  (latexinfo-format-do-ref arg 'latexinfo-findex))

(put 'varref 'latexinfo-format 'latexinfo-format-varref)
(put 'conref 'latexinfo-format 'latexinfo-format-varref)
(defun latexinfo-format-varref ()
  (let ((arg  (latexinfo-parse-arg-discard)))
    (insert arg " ")
    (latexinfo-format-vref arg)))

(defun latexinfo-format-vref (arg)
  (latexinfo-format-do-ref arg 'latexinfo-vindex))

(put 'pxlref 'latexinfo-format 'latexinfo-format-ref)
(put 'xlref 'latexinfo-format 'latexinfo-format-ref)

(provide 'funref-fmt)