Function: TeX-arg-file-name

TeX-arg-file-name is a byte-compiled function defined in latex.el.

Signature

(TeX-arg-file-name OPTIONAL &optional PROMPT)

Documentation

Prompt for a file name.

Initial input is the name of the file being visited in the current buffer, with extension. If OPTIONAL is non-nil, insert it as an optional argument. Use PROMPT as the prompt string.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
(defun TeX-arg-file-name (optional &optional prompt)
  "Prompt for a file name.
Initial input is the name of the file being visited in the
current buffer, with extension.  If OPTIONAL is non-nil, insert
it as an optional argument.  Use PROMPT as the prompt string."
  (let ((name (file-name-nondirectory (TeX-buffer-file-name))))
    (TeX-argument-insert
     (TeX-read-string
      (TeX-argument-prompt optional
                           (when prompt
                             (if optional
                                 prompt
                               (format (concat prompt " (default %s)") name)))
                           (if optional
                               "Name"
                             (format "Name (default %s)" name)))
      nil nil (if optional nil name))
     optional)))