Function: tex-format-cmd
tex-format-cmd is a byte-compiled function defined in tex-mode.el.gz.
Signature
(tex-format-cmd FORMAT FSPEC)
Documentation
Like format-spec but add user-specified args to the command.
Only applies the FSPEC to the args part of FORMAT.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/tex-mode.el.gz
(defun tex-format-cmd (format fspec)
"Like `format-spec' but add user-specified args to the command.
Only applies the FSPEC to the args part of FORMAT."
(setq fspec (tex--quote-spec fspec))
(if (not (string-match "\\([^ /\\]+\\) " format))
(format-spec format fspec)
(let* ((prefix (substring format 0 (match-beginning 0)))
(cmd (match-string 1 format))
(args (substring format (match-end 0)))
(sym (intern-soft (format "tex-cmd-%s-args" cmd)))
(extra-args (and sym (symbol-value sym))))
(concat prefix cmd
(if extra-args (concat " " extra-args))
" " (format-spec args fspec)))))